-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plain fonts #2411
Merged
Merged
Plain fonts #2411
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bb30324
New Definition class FontDef for font selecting commands defined by \…
brucemiller 71218a7
Rename parameter type FontToken to FontDef for cs explicitly defined …
brucemiller 1badc03
Update \meaning to recognize new FontDef font commands
brucemiller 35c2a2e
Update \the to recognize FontDef commands defined by \font and proces…
brucemiller 6f7f868
Moved decodeMathChar to Package.pm, updating it to more correctly dec…
brucemiller b27e41a
Note that \mit doesn't REQUIRE math, but ony has effect in math (sets…
brucemiller 91ef537
Consistent use of font decoding makes apparent misuse of T_OTHER when…
brucemiller 73fe017
Fix mangled renesting of if/else
brucemiller e9bf750
\cal also does not require math and does nothing in text
brucemiller c764042
Add test case for plain style font manipulations
brucemiller f6afd64
Improve decoding of font filenames into family/series/shape and IMPOR…
brucemiller af96721
Update FontMap to provide options for alphanumerics to remain ASCII i…
brucemiller 8d586d5
Make FontDecode in math keep alphanumerics in math as ASCII w/font ch…
brucemiller 3f6ab14
Update all callers of FontDecode
brucemiller 1a27ba6
Make \cal return a Box so that it can revert
brucemiller 6317280
Enhance and correct plain fonts test cases
brucemiller 2a0bd12
Code cleanup suggested by D.Ginev
brucemiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update \meaning to recognize new FontDef font commands
- Loading branch information
commit 1badc03611a3aca881fb6f925bc2050854b6a83b
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,14 +102,15 @@ DefMacro('\meaning Token', sub { | |
$type =~ s/^LaTeXML:://; | ||
# Pre-step: We can't extract the bodies of definitions which are defined via Perl subroutines. | ||
# So do the next best thing -- represent them as their tokens. | ||
if ($type =~ /(primitive|conditional|constructor)$/i) { | ||
$definition = $definition->getCSorAlias; | ||
$type = ref $definition; | ||
$type =~ s/^LaTeXML:://; | ||
if (my $fontinfo = LookupValue('fontinfo_' . ToString($definition))) { | ||
$meaning = 'select font ' . ($$fontinfo{fontname} || 'fontname'); | ||
if ($type =~ /(fontdef)$/i) { | ||
if (my $fontinfo = $definition->isFontDef) { | ||
$meaning = 'select font ' . ($$fontinfo{name} || 'fontname'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, this is a very healthy improvement for |
||
$meaning .= ' at ' . $$fontinfo{at} if $$fontinfo{at}; | ||
$type = 'font'; } } | ||
elsif ($type =~ /(primitive|conditional|constructor)$/i) { | ||
$definition = $definition->getCSorAlias; | ||
$type = ref $definition; | ||
$type =~ s/^LaTeXML:://; } | ||
# The actual tests start here | ||
if ($type =~ /token$/i) { | ||
my $cc = $definition->getCatcode; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(fontdef)
doesn't need the parens, I assume they're leftoverThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!