From: Bastian Germann Date: Mon, 22 Sep 2025 15:00:07 +0000 (+0200) Subject: Drop non-free multiple master font code X-Git-Tag: archive/raspbian/1%20230101_dfsg-8+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=27c300c291926ee023924df25ba7d4343d269ff7;p=fontforge.git Drop non-free multiple master font code This should be replaced by properly repackaging when upstream has organised the code to be separate: https://github.com/fontforge/fontforge/pull/5622 Gbp-Pq: Name 0004-Drop-non-free-multiple-master-font-code.patch --- diff --git a/fontforge/othersubrs.c b/fontforge/othersubrs.c index ea36204..b876c52 100644 --- a/fontforge/othersubrs.c +++ b/fontforge/othersubrs.c @@ -32,8 +32,6 @@ #include "splinefont.h" #include "ustring.h" -/* These subroutines are code by Adobe for this exact use (from T1_Spec.pdf) */ - /* 3 0 callothersubr pop pop setcurrentpoint return */ static const uint8_t subrs0[] = { 3+139, 0+139, 12, 16, 12, 17, 12, 17, 12, 33, 11 }; /* 0 1 callothersubr return */ @@ -291,24 +289,6 @@ static const char **default_othersubrs[] = { othersubrs0, othersubrs1, othersubr NULL }; -/* Lives in private dictionary. Commonly used. I have no docs on it */ -/* (and Adobe's answer when asked about it was "try it and figure out what it does" */ -/* The first numbers (9.5,72) change in different uses (4.5,34), (4.5,38), (5.5,41), (6.5,50) are other combo */ -/* James Cloos notes that the second number is /StdVW, and the first number is */ -/* StdVW 8 idiv .5 add */ -/* -const char *erode[] = { - "/Erode", - "{ 9.5 dup 3 -1 roll 0.1 mul exch 0.5 sub mul cvi sub dup mul", - " 72 0 dtransform dup mul exch dup mul add le", - " { pop pop 1.0 1.0 }", - " { pop pop 0.0 1.5 }", - " ifelse", - "} bind def", - NULL -}; -*/ - /* from Adobe Technical Specification #5014, Adobe CMap and CIDFont Files */ /* Specification, Version 1.0. */ const char *cid_othersubrs[] = { @@ -336,144 +316,10 @@ const char *cid_othersubrs[] = { const char *makeblendedfont[] = { - "% Copyright (c) 1990-1994 Adobe Systems Incorporated.", - "% All Rights Reserved.", -/* Adobe has posted a copyright notice in 5015.Type1_Supp.pdf with the */ -/* wrong comment here. I've changed it */ - "% This code to be used for multiple master fonts.", - "% Version 11", - "/shareddict where", - "{ pop currentshared { setshared } true setshared shareddict }", - "{ {} userdict } ifelse dup", - "/makeblendedfont where {/makeblendedfont get dup type /operatortype eq {", - "pop false} { 0 get dup type /integertype ne", - "{pop false} {11 lt} ifelse} ifelse } {true}ifelse", - "{/makeblendedfont {", - "11 pop", - "2 copy length exch /WeightVector get length eq", - "{ dup 0 exch {add} forall 1 sub abs .001 gt }", - "{ true } ifelse", - "{ /makeblendedfont cvx errordict /rangecheck get exec } if", - "exch dup dup maxlength dict begin {", - "false {/FID /UniqueID /XUID } { 3 index eq or } forall", - " { pop pop } { def } ifelse", - "} forall", - "/XUID 2 copy known{", - "get dup length 2 index length sub dup 0 gt{", - "exch dup length array copy", - "exch 2 index{65536 mul cvi 3 copy put pop 1 add}forall pop/XUID exch def", - "}{pop pop}ifelse", - "}{pop pop}ifelse", - "{ /Private /FontInfo } {", - "dup load dup maxlength dict begin {", - "false { /UniqueID /XUID } { 3 index eq or } forall", - "{ pop pop }{ def } ifelse } forall currentdict end def", - "} forall", - "dup /WeightVector exch def", - "dup /$Blend exch [", - "exch false exch", - "dup length 1 sub -1 1 {", - "1 index dup length 3 -1 roll sub get", - "dup 0 eq {", - "pop 1 index {/exch load 3 1 roll} if", - "/pop load 3 1 roll", - "} {dup 1 eq {pop}", - "{2 index {/exch load 4 1 roll} if", - "3 1 roll /mul load 3 1 roll } ifelse", - "1 index {/add load 3 1 roll} if", - "exch pop true exch} ifelse", - "} for", - "pop { /add load } if", - "] cvx def", - "{2 copy length exch length ne {/makeblendedfont cvx errordict /typecheck get exec}if", - "0 0 1 3 index length 1 sub {", - "dup 4 index exch get exch 3 index exch get mul add", - "} for", - "exch pop exch pop}", - "{{dup type dup dup /arraytype eq exch /packedarraytype eq or {", - " pop 1 index /ForceBold eq {", - " 5 index 0 0 1 3 index length 1 sub {", - " dup 4 index exch get {2 index exch get add } {pop} ifelse", - " } for exch pop exch pop", - " 2 index /ForceBoldThreshold get gt 3 copy} {", - "{length 1 index length ne { pop false } {", - "true exch { type dup /integertype eq exch /realtype eq exch or and } forall", - "} ifelse }", - "2 copy 8 index exch exec {pop 5 index 5 index exec}", - "{exch dup length array 1 index xcheck { cvx } if", - "dup length 1 sub 0 exch 1 exch {", - "dup 3 index exch get dup type dup /arraytype eq exch /packedarraytype eq or {", - "dup 10 index 6 index exec {", - "9 index exch 9 index exec} if } if 2 index 3 1 roll put", - "} for exch pop exch pop", - "} ifelse 3 copy", - "1 index dup /StemSnapH eq exch /StemSnapV eq or {", - "dup length 1 sub {dup 0 le { exit } if", - "dup dup 1 sub 3 index exch get exch 3 index exch get 2 copy eq {", - "pop 2 index 2 index 0 put 0 } if le {1 sub}", - "{dup dup 1 sub 3 index exch get exch 3 index exch get", - "3 index exch 3 index 1 sub exch put", - "3 copy put pop", - "2 copy exch length 1 sub lt {1 add} if} ifelse} loop pop", - "dup 0 get 0 le {", - "dup 0 exch {0 gt { exit } if 1 add} forall", - "dup 2 index length exch sub getinterval} if } if } ifelse put }", - "{/dicttype eq {6 copy 3 1 roll get exch 2 index exec}", - "{/makeblendedfont cvx errordict /typecheck get exec} ifelse", - "} ifelse pop pop } forall pop pop pop pop }", - "currentdict Blend 2 index exec", - "currentdict end", - "} bind put", - "/$fbf {FontDirectory counttomark 3 add -1 roll known {", - "cleartomark pop findfont}{", - "] exch findfont exch makeblendedfont", - "dup /Encoding currentfont /Encoding get put definefont", - "} ifelse currentfont /ScaleMatrix get makefont setfont", - "} bind put } { pop pop } ifelse exec", NULL }; const char *mmfindfont[] = { - "/$mmff_origfindfont where {", - " pop save { restore } { pop pop }", - "} { {} { def } } ifelse", - "/setshared where { pop true } { false } ifelse", - "/findfont where pop dup systemdict eq {", - "pop { currentshared {{}} { true setshared { false setshared } } ifelse shareddict", - "} {{} userdict } ifelse begin", - "} { begin { currentdict scheck } { false } ifelse {", - "currentshared {{}} { true setshared { false setshared } } ifelse", - "} { {} } ifelse } ifelse", - "/$mmff_origfindfont /findfont load 3 index exec", - "/findfont {", - "dup FontDirectory exch known", - "{ dup FontDirectory exch get /FontType get 3 ne}", - "{ dup SharedFontDirectory exch known", - "{ dup SharedFontDirectory exch get /FontType get 3 ne}", - "{ false} ifelse} ifelse", - "{$mmff_origfindfont} { dup dup length string cvs (_) search {", - "cvn dup dup FontDirectory exch known exch SharedFontDirectory exch known or {", - "true} {dup length 7 add string dup 0 (%font%) putinterval", - "dup 2 index 6 exch dup length string cvs putinterval", - "{ status } stopped { pop false } if {", - "pop pop pop pop true} {false} ifelse} ifelse {", - "$mmff_origfindfont begin pop", - "[ exch { (_) search { { cvr } stopped { pop pop } {", - "exch pop exch } ifelse", - "} { pop exit } ifelse } loop false /FontInfo where {", - "pop FontInfo /BlendAxisTypes 2 copy known {", - "get length counttomark 2 sub eq exch pop", - "} { pop pop } ifelse } if {", - "NormalizeDesignVector", - "ConvertDesignVector", - "] currentdict exch makeblendedfont", - "2 copy exch /FontName exch put", - "definefont} { cleartomark $mmff_origfindfont } ifelse end", - "} { pop pop pop $mmff_origfindfont } ifelse", - "} { pop $mmff_origfindfont } ifelse } ifelse", - "} bind 3 index exec", - "/SharedFontDirectory dup where { pop pop } { 0 dict 3 index exec } ifelse", - "end exec pop exec", NULL };