Created
June 2, 2014 10:07
-
-
Save munepi/4cd7c07b8afa7d819ead to your computer and use it in GitHub Desktop.
PXacid-0.2.3に対して、新しいseriesの追加ならびに \<family>@scale 対応するパッチ
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
--- pxacid.pl.orig 2011-02-18 01:00:00.000000000 +0900 | |
+++ pxacid.pl 2014-03-10 23:06:41.000000000 +0900 | |
@@ -1322,7 +1323,17 @@ sub use_berry { $use_berry = $_[0]; } | |
# NFSS シリーズ名 → Berry 規則識別子 | |
our $ser_kb = { | |
- l => 'l', m => 'r', b => 'b', bx => 'b', eb => 'x' | |
+ ul => 'a', # UltraLight | |
+ el => 'j', # ExtraLight | |
+ l => 'l', # Light | |
+ m => 'r', # Regular | |
+ mb => 'm', # Medium | |
+ db => 'd', # DemiBold | |
+ sb => 's', # SemiBold | |
+ b => 'b', # Bold | |
+ bx => 'b', # Bold | |
+ eb => 'x', # Extra | |
+ ub => 'u' # Ultra | |
}; | |
# NFSS シェープ名 → Berry 規則識別子 | |
our $shp_kb = { | |
@@ -1402,6 +1413,7 @@ sub source_fd { | |
($ser1, $shp1) = $ent =~ m|^(.*)/(.*)$| or die; | |
if (defined $spec{$ent}) { | |
$text = $spec{$ent}; | |
+ $text = "\\$fam\@\@scale " . $text unless ($text =~ m/\\$fam\@\@scale/); | |
} else { | |
# シリーズの代替: bとbxの一方のみがある場合は, 他方をそれで代替. | |
# mがない場合は今追加したシリーズで代替. それ以外はmで代替. | |
@@ -1418,6 +1430,11 @@ sub source_fd { | |
my $fdname = lc("$enc$fam"); | |
return <<"END"; | |
% $fdname.fd | |
+\\expandafter\\ifx\\csname $fam\@scale\\endcsname\\relax | |
+ \\let\\$fam\@\@scale\\\@empty | |
+\\else | |
+ \\edef\\$fam\@\@scale{s*[\\csname $fam\@scale\\endcsname]}% | |
+\\fi | |
\\DeclareFontFamily{$enc}{$fam}{} | |
$text | |
%% EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment