diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2014-03-13 09:27:28 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2014-03-13 11:01:55 +0000 |
commit | fdaa74efeebb753db1855eaf6a3a824ecbf1231e (patch) | |
tree | 06c26b361c3646c3835992303e3caa591e834896 | |
parent | fe0b8fcfb69246cbea99b85f453ed6c3c83f4592 (diff) | |
download | ghostpdl-fdaa74efeebb753db1855eaf6a3a824ecbf1231e.tar.gz |
Remove deprecated glyph mapping code.
No cluster differences.
-rw-r--r-- | gs/Resource/Init/gs_ttf.ps | 312 | ||||
-rw-r--r-- | gs/Resource/Init/gs_type1.ps | 98 |
2 files changed, 83 insertions, 327 deletions
diff --git a/gs/Resource/Init/gs_ttf.ps b/gs/Resource/Init/gs_ttf.ps index b3328a4f7..ebbf70fee 100644 --- a/gs/Resource/Init/gs_ttf.ps +++ b/gs/Resource/Init/gs_ttf.ps @@ -1204,204 +1204,6 @@ mark =string cvs (_) exch concatstrings cvn } bind def -% To be removed 9.09..... -% -% Provide alternative backward-compatible names for new TTF glyphs. -% This list was extracted from Adobe's Glyph List 2.0 and consists of -% glyph names that map to the same Unicode value. -% See: http://partners.adobe.com/asn/developer/typeforum/unicodegn.html -/postalias mark - /pi1 /pi /plusinus /plusminus - /Acyrillic /afii10017 /Becyrillic /afii10018 - /Cdot /Cdotaccent /Checyrillic /afii10041 - /Dcroat /Dslash /Decyrillic /afii10021 - /Delta /increment /Djecyrillic /afii10051 - /Dzecyrillic /afii10054 /Dzhecyrillic /afii10145 - /Ecyrillic /afii10053 /Edot /Edotaccent - /Efcyrillic /afii10038 /Elcyrillic /afii10029 - /Emcyrillic /afii10030 /Encyrillic /afii10031 - /Ercyrillic /afii10034 /Ereversedcyrillic /afii10047 - /Escyrillic /afii10035 /Euro /euro - /Fitacyrillic /afii10147 /Gcedilla /Gcommaaccent - /Gdot /Gdotaccent /Gecyrillic /afii10020 - /Gheupturncyrillic /afii10050 /Gjecyrillic /afii10052 - /H18533 /blackcircle /H18543 /blacksmallsquare - /H18551 /whitesmallsquare /H22073 /whitesquare - /Hardsigncyrillic /afii10044 /IAcyrillic /afii10049 - /IUcyrillic /afii10048 /Icyrillic /afii10055 - /Idot /Idotaccent /Iecyrillic /afii10022 - /Iicyrillic /afii10026 /Iishortcyrillic /afii10027 - /Iocyrillic /afii10023 /Izhitsacyrillic /afii10148 - /Jecyrillic /afii10057 /Kacyrillic /afii10028 - /Kcedilla /Kcommaaccent /Khacyrillic /afii10039 - /Kjecyrillic /afii10061 /Lcedilla /Lcommaaccent - /Ldot /Ldotaccent /Ljecyrillic /afii10058 - /Ncedilla /Ncommaaccent /Njecyrillic /afii10059 - /Ocyrillic /afii10032 /Odblacute /Ohungarumlaut - /Ohm /Omega /Oslashacute /Ostrokeacute - /Pecyrillic /afii10033 /Rcedilla /Rcommaaccent - /Shacyrillic /afii10042 /Shchacyrillic /afii10043 - /Softsigncyrillic /afii10046 /Tcedilla /Tcommaaccent - /Tecyrillic /afii10036 /Tsecyrillic /afii10040 - /Tshecyrillic /afii10060 /Ucyrillic /afii10037 - /Udblacute /Uhungarumlaut /Upsilon1 /Upsilonhooksymbol - /Ushortcyrillic /afii10062 /Vecyrillic /afii10019 - /Yatcyrillic /afii10146 /Yericyrillic /afii10045 - /Yicyrillic /afii10056 /Zdot /Zdotaccent - /Zecyrillic /afii10025 /Zhecyrillic /afii10024 - /acutecmb /acutecomb /acyrillic /afii10065 - /afii00208 /horizontalbar /afii08941 /lira - /afii10066 /becyrillic /afii10067 /vecyrillic - /afii10068 /gecyrillic /afii10069 /decyrillic - /afii10070 /iecyrillic /afii10071 /iocyrillic - /afii10072 /zhecyrillic /afii10073 /zecyrillic - /afii10074 /iicyrillic /afii10075 /iishortcyrillic - /afii10076 /kacyrillic /afii10077 /elcyrillic - /afii10078 /emcyrillic /afii10079 /encyrillic - /afii10080 /ocyrillic /afii10081 /pecyrillic - /afii10082 /ercyrillic /afii10083 /escyrillic - /afii10084 /tecyrillic /afii10085 /ucyrillic - /afii10086 /efcyrillic /afii10087 /khacyrillic - /afii10088 /tsecyrillic /afii10089 /checyrillic - /afii10090 /shacyrillic /afii10091 /shchacyrillic - /afii10092 /hardsigncyrillic /afii10093 /yericyrillic - /afii10094 /softsigncyrillic /afii10095 /ereversedcyrillic - /afii10096 /iucyrillic /afii10097 /iacyrillic - /afii10098 /gheupturncyrillic /afii10099 /djecyrillic - /afii10100 /gjecyrillic /afii10101 /ecyrillic - /afii10102 /dzecyrillic /afii10103 /icyrillic - /afii10104 /yicyrillic /afii10105 /jecyrillic - /afii10106 /ljecyrillic /afii10107 /njecyrillic - /afii10108 /tshecyrillic /afii10109 /kjecyrillic - /afii10110 /ushortcyrillic /afii10193 /dzhecyrillic - /afii10194 /yatcyrillic /afii10195 /fitacyrillic - /afii10196 /izhitsacyrillic /afii10846 /schwacyrillic - /afii57381 /percentarabic /afii57388 /commaarabic - /afii57392 /zeroarabic /afii57393 /onearabic - /afii57394 /twoarabic /afii57395 /threearabic - /afii57396 /fourarabic /afii57397 /fivearabic - /afii57398 /sixarabic /afii57399 /sevenarabic - /afii57400 /eightarabic /afii57401 /ninearabic - /afii57403 /semicolonarabic /afii57407 /questionarabic - /afii57409 /hamzaarabic /afii57410 /alefmaddaabovearabic - /afii57411 /alefhamzaabovearabic /afii57412 /wawhamzaabovearabic - /afii57413 /alefhamzabelowarabic /afii57414 /yehhamzaabovearabic - /afii57415 /alefarabic /afii57416 /beharabic - /afii57417 /tehmarbutaarabic /afii57418 /teharabic - /afii57419 /theharabic /afii57420 /jeemarabic - /afii57421 /haharabic /afii57422 /khaharabic - /afii57423 /dalarabic /afii57424 /thalarabic - /afii57425 /reharabic /afii57426 /zainarabic - /afii57427 /seenarabic /afii57428 /sheenarabic - /afii57429 /sadarabic /afii57430 /dadarabic - /afii57431 /taharabic /afii57432 /zaharabic - /afii57433 /ainarabic /afii57434 /ghainarabic - /afii57440 /tatweelarabic /afii57441 /feharabic - /afii57442 /qafarabic /afii57443 /kafarabic - /afii57444 /lamarabic /afii57445 /meemarabic - /afii57446 /noonarabic /afii57448 /wawarabic - /afii57449 /alefmaksuraarabic /afii57450 /yeharabic - /afii57451 /fathatanarabic /afii57452 /dammatanarabic - /afii57453 /kasratanarabic /afii57454 /fathaarabic - /afii57455 /dammaarabic /afii57456 /kasraarabic - /afii57457 /shaddaarabic /afii57458 /sukunarabic - /afii57470 /heharabic /afii57505 /veharabic - /afii57506 /peharabic /afii57507 /tcheharabic - /afii57508 /jeharabic /afii57509 /gafarabic - /afii57511 /tteharabic /afii57512 /ddalarabic - /afii57513 /rreharabic /afii57514 /noonghunnaarabic - /afii57519 /yehbarreearabic /afii57636 /newsheqelsign - /afii57645 /maqafhebrew /afii57658 /sofpasuqhebrew - /afii57664 /alef /afii57665 /bet - /afii57666 /gimel /afii57667 /dalet - /afii57668 /he /afii57669 /vav - /afii57670 /zayin /afii57671 /het - /afii57672 /tet /afii57673 /yod - /afii57674 /finalkaf /afii57675 /kaf - /afii57676 /lamed /afii57677 /finalmem - /afii57678 /mem /afii57679 /finalnun - /afii57680 /nun /afii57681 /samekh - /afii57682 /ayin /afii57683 /finalpe - /afii57684 /pe /afii57685 /finaltsadi - /afii57686 /tsadi /afii57687 /qof - /afii57688 /resh /afii57689 /shin - /afii57690 /tav /afii57694 /shinshindot - /afii57695 /shinsindot /afii57700 /vavholam - /afii57705 /doubleyodpatah /afii57716 /vavvavhebrew - /afii57717 /vavyodhebrew /afii57718 /yodyodhebrew - /afii57723 /vavdagesh /afii57793 /hiriq - /afii57794 /tsere /afii57795 /segol - /afii57796 /qubuts /afii57797 /qamats - /afii57798 /patah /afii57799 /sheva - /afii57800 /hatafpatah /afii57801 /hatafsegol - /afii57802 /hatafqamats /afii57803 /sindothebrew - /afii57804 /shindothebrew /afii57806 /holam - /afii57807 /dagesh /afii57839 /siluqhebrew - /afii57841 /rafe /afii57842 /paseqhebrew - /afii57929 /apostrophemod /afii61248 /careof - /afii61289 /lsquare /afii61352 /numero - /afii61664 /zerowidthnonjoiner /afii63167 /asteriskarabic - /afii64937 /commareversedmod /alefmaksurainitialarabic /yehinitialarabic - /alefmaksuramedialarabic /yehmedialarabic /approximatelyequal /congruent - /arrowdblboth /dblarrowleft /arrowdblleft /arrowleftdbl - /arrowdblright /dblarrowright /arrowupdnbse /arrowupdownbase - /bar /verticalbar /betdagesh /betdageshhebrew - /blackdownpointingtriangle /triagdn /blackleftpointingpointer /triaglf - /blackrectangle /filledrect /blackrightpointingpointer /triagrt - /blacksmilingface /invsmileface /blacksquare /filledbox - /blackuppointingtriangle /triagup /bulletinverse /invbullet - /cdot /cdotaccent /circle /whitecircle - /circlemultiply /timescircle /circleplus /pluscircle - /club /clubsuitblack /colonmonetary /colonsign - /compass /sun /daletdagesh /daletdageshhebrew - /dargahebrew /dargalefthebrew /dbllowline /underscoredbl - /dcroat /dmacron /decimalseparatorarabic /decimalseparatorpersian - /dialytikatonos /dieresistonos /dkshade /shadedark - /dotbelowcmb /dotbelowcomb /edot /edotaccent - /eighthnotebeamed /musicalnotedbl /etnahtafoukhhebrew /etnahtahebrew - /existential /thereexists /female /venus - /finalkafdagesh /finalkafdageshhebrew /forall /universal - /gcedilla /gcommaaccent /gdot /gdotaccent - /gimeldagesh /gimeldageshhebrew /gradient /nabla - /gravecmb /gravecomb /haaltonearabic /hehaltonearabic - /heart /heartsuitblack /hedagesh /hedageshhebrew - /hehfinalalttwoarabic /hehfinalarabic /hookabovecomb /hookcmb - /ilde /tilde /integralbottom /integralbt - /integraltop /integraltp /invcircle /whitecircleinverse - /kafdagesh /kafdageshhebrew /kcedilla /kcommaaccent - /lameddagesh /lameddageshhebrew /lcedilla /lcommaaccent - /ldot /ldotaccent /logicalnotreversed /revlogicalnot - /longs /slong /ltshade /shadelight - /macron /overscore /mahapakhhebrew /mahapakhlefthebrew - /male /mars /memdagesh /memdageshhebrew - /merkhahebrew /merkhalefthebrew /merkhakefulahebrew /merkhakefulalefthebrew - /middot /periodcentered /mu /mu1 - /munahhebrew /munahlefthebrew /napostrophe /quoterightn - /nbspace /nonbreakingspace /ncedilla /ncommaaccent - /notelement /notelementof /nundagesh /nundageshhebrew - /odblacute /ohungarumlaut /omega1 /pisymbolgreek - /openbullet /whitebullet /orthogonal /rightangle - /oslashacute /ostrokeacute /pedagesh /pedageshhebrew - /phi1 /phisymbolgreek /propersubset /subset - /propersuperset /superset /qofdagesh /qofdageshhebrew - /quoteleftreversed /quotereversed /rcedilla /rcommaaccent - /reflexsubset /subsetorequal /reflexsuperset /supersetorequal - /reviahebrew /reviamugrashhebrew /samekhdagesh /samekhdageshhebrew - /sfthyphen /softhyphen /shade /shademedium - /sheqel /sheqelhebrew /shindagesh /shindageshhebrew - /shindageshshindot /shindageshshindothebrew /shindageshsindot /shindageshsindothebrew - /sigma1 /sigmafinal /similar /tildeoperator - /smileface /whitesmilingface /space /spacehackarabic - /spade /spadesuitblack /tavdages /tavdagesh - /tcedilla /tcommaaccent /tetdagesh /tetdageshhebrew - /tevirhebrew /tevirlefthebrew /theta1 /thetasymbolgreek - /thousandsseparatorarabic /thousandsseparatorpersian /tildecmb /tildecomb - /tipehahebrew /tipehalefthebrew /tsadidagesh /tsadidageshhebrew - /twodotenleader /twodotleader /udblacute /uhungarumlaut - /yerahbenyomohebrew /yerahbenyomolefthebrew /yoddagesh /yoddageshhebrew - /zayindagesh /zayindageshhebrew /zdot /zdotaccent -.dicttomark readonly def -% .....to be removed 9.09 % - .charkeys /CharStrings <charstrings> /Encoding <encoding> % Resets glyphencoding @@ -1478,77 +1280,55 @@ mark (CharStrings:)= dup { exch =string cvs print ( ) print //== exec } forall } if -% To be removed 9.09..... - /USEOLDGLYPHALIASING where {/USEOLDGLYPHALIASING get}{false}ifelse - { - //postalias { - % process pairs of names. If both names are known, do nothing. Otherwise - % make the name that is not defined an alias for the one that does exist. - % Stack: CharStrings(dict) /name1 /name2 - 2 index 2 index known 3 index 2 index known 1 index xor not { - pop pop pop % both names known or neither known - } { - % Stack: CharStrings(dict) /name1 /name2 name1_known(bool) - { exch } if % /name1 known -- we need it on top - % Stack: CharStrings(dict) /alias_name /known_name - TTFDEBUG { (setting alias: ) print 1 index ==only ( to be the same as glyph: ) print dup //== exec } if - 2 index exch get 2 index 3 1 roll put - } ifelse - } forall - readonly - } -%....to be removed 9.09 - { - % Provide all known aliases for each glyph - - % Create an empty code point to glyph dictionary - 0 dict exch - % Build a mapping from code points to known glyphs - //AdobeGlyphList { - % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint - 2 index 2 index known - { exch 3 index 3 1 roll .growput } - { pop pop } - ifelse - } forall - % Add aliases for missing names - //AdobeGlyphList { - % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint - 2 index 2 index known - { pop pop } - { 2 index 3 1 roll 4 index 1 index .knownget - % Try mapping unknown name to equivalent known glyph - { TTFDEBUG { (setting alias: ) print 2 index ==only - ( to be the same as glyph: ) print dup //== exec } if - exch pop 2 index exch get .growput } - % Try mapping unknown name to known uniXXXX glyph - { dup 16 4 string cvrs dup length neg 7 add (uni0000) 7 string copy dup - 4 -2 roll exch putinterval cvn 3 index 1 index .knownget - { TTFDEBUG { (setting alias: ) print 3 index ==only - ( to be the same as glyph: ) print 1 index //== exec } if - 3 1 roll pop pop .growput } - % Try mapping unknown name to glyph based on Unicode cmap - % Stack: CharStrings(dict) CharStrings(dict) /name codepoint (uniXXXX) - { pop - % Only proceed if the cmap is known to be Unicode. - % Note that the current check specifically looks for - % Windows Unicode which may be an overly strict restriction. - cmapsub 0 4 getinterval <00030001> eq - { cmapa exch .knownget - { TTFDEBUG { (setting alias: ) print 1 index ==only - ( to use glyph index: ) print dup //== exec } if - .growput } - { pop pop } - ifelse } - { pop pop pop } + % Provide all known aliases for each glyph + + % Create an empty code point to glyph dictionary + 0 dict exch + % Build a mapping from code points to known glyphs + //AdobeGlyphList { + % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint + 2 index 2 index known + { exch 3 index 3 1 roll .growput } + { pop pop } + ifelse + } forall + % Add aliases for missing names + //AdobeGlyphList { + % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint + 2 index 2 index known + { pop pop } + { 2 index 3 1 roll 4 index 1 index .knownget + % Try mapping unknown name to equivalent known glyph + { TTFDEBUG { (setting alias: ) print 2 index ==only + ( to be the same as glyph: ) print dup //== exec } if + exch pop 2 index exch get .growput } + % Try mapping unknown name to known uniXXXX glyph + { dup 16 4 string cvrs dup length neg 7 add (uni0000) 7 string copy dup + 4 -2 roll exch putinterval cvn 3 index 1 index .knownget + { TTFDEBUG { (setting alias: ) print 3 index ==only + ( to be the same as glyph: ) print 1 index //== exec } if + 3 1 roll pop pop .growput } + % Try mapping unknown name to glyph based on Unicode cmap + % Stack: CharStrings(dict) CharStrings(dict) /name codepoint (uniXXXX) + { pop + % Only proceed if the cmap is known to be Unicode. + % Note that the current check specifically looks for + % Windows Unicode which may be an overly strict restriction. + cmapsub 0 4 getinterval <00030001> eq + { cmapa exch .knownget + { TTFDEBUG { (setting alias: ) print 1 index ==only + ( to use glyph index: ) print dup //== exec } if + .growput } + { pop pop } ifelse } + { pop pop pop } ifelse } ifelse } - ifelse - } forall - exch pop - readonly - } ifelse + ifelse } + ifelse + } forall + exch pop + readonly /Encoding [ diff --git a/gs/Resource/Init/gs_type1.ps b/gs/Resource/Init/gs_type1.ps index bee1ac225..d57095d37 100644 --- a/gs/Resource/Init/gs_type1.ps +++ b/gs/Resource/Init/gs_type1.ps @@ -61,71 +61,47 @@ ifelse } if -% To be removed 9.09..... - /USEOLDGLYPHALIASING where {/USEOLDGLYPHALIASING get}{false}ifelse - { - dup /CharStrings get dup dup - //t1_glyph_equivalence { % <<>> <<>> <<>> /gl1 /gl2 - 2 index 2 index known { - 2 index 1 index known { - pop pop - } { - 3 1 roll get //.growput superexec dup dup - } ifelse - } { - 2 index 1 index known { - exch 3 1 roll get //.growput superexec dup dup - } { - pop pop - } ifelse - } ifelse - } forall - pop pop pop - } -%....to be removed 9.09 - { - dup /CharStrings get + dup /CharStrings get - % Provide all known aliases for each glyph if - % substitution is allowed (pf2afm.ps has code - % to disables it by modifying t1_glyph_equivalence). + % Provide all known aliases for each glyph if + % substitution is allowed (pf2afm.ps has code + % to disables it by modifying t1_glyph_equivalence). - t1_glyph_equivalence length 0 ne { - % Create an empty code point to glyph dictionary - 0 dict exch - % Build a mapping from code points to known glyphs - AdobeGlyphList { - % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint - 2 index 2 index known - { exch 3 index 3 1 roll .growput } - { pop pop } - ifelse - } forall - % Add aliases for missing names - AdobeGlyphList { - % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint - 2 index 2 index known - { pop pop } - { 2 index 3 1 roll 4 index 1 index .knownget - % Try mapping unknown name to equivalent known glyph - { CCFONTDEBUG { (setting alias: ) print 2 index ==only - ( to be the same as glyph: ) print dup //== exec } if - exch pop 2 index exch get //.growput superexec } - % Try mapping unknown name to known uniXXXX glyph - { dup 16 4 string cvrs dup length neg 7 add (uni0000) 7 string copy dup - 4 -2 roll exch putinterval cvn 3 index 1 index .knownget - { CCFONTDEBUG { (setting alias: ) print 3 index ==only - ( to be the same as glyph: ) print 1 index //== exec } if - 3 1 roll pop pop //.growput superexec } - { pop pop pop pop } - ifelse } + t1_glyph_equivalence length 0 ne { + % Create an empty code point to glyph dictionary + 0 dict exch + % Build a mapping from code points to known glyphs + AdobeGlyphList { + % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint + 2 index 2 index known + { exch 3 index 3 1 roll .growput } + { pop pop } + ifelse + } forall + % Add aliases for missing names + AdobeGlyphList { + % Stack: CPtoGlyph(dict) CharStrings(dict) /name codepoint + 2 index 2 index known + { pop pop } + { 2 index 3 1 roll 4 index 1 index .knownget + % Try mapping unknown name to equivalent known glyph + { CCFONTDEBUG { (setting alias: ) print 2 index ==only + ( to be the same as glyph: ) print dup //== exec } if + exch pop 2 index exch get //.growput superexec } + % Try mapping unknown name to known uniXXXX glyph + { dup 16 4 string cvrs dup length neg 7 add (uni0000) 7 string copy dup + 4 -2 roll exch putinterval cvn 3 index 1 index .knownget + { CCFONTDEBUG { (setting alias: ) print 3 index ==only + ( to be the same as glyph: ) print 1 index //== exec } if + 3 1 roll pop pop //.growput superexec } + { pop pop pop pop } ifelse } - ifelse - } forall - pop - } if + ifelse } + ifelse + } forall pop - } ifelse + } if + pop //.buildfont1 3 2 roll .setglobal |