encodings.h 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015
  1. // Copyright (C) 2004-2021 Artifex Software, Inc.
  2. //
  3. // This file is part of MuPDF.
  4. //
  5. // MuPDF is free software: you can redistribute it and/or modify it under the
  6. // terms of the GNU Affero General Public License as published by the Free
  7. // Software Foundation, either version 3 of the License, or (at your option)
  8. // any later version.
  9. //
  10. // MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
  11. // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. // FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. // details.
  14. //
  15. // You should have received a copy of the GNU Affero General Public License
  16. // along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
  17. //
  18. // Alternative licensing terms are available from the licensor.
  19. // For commercial licensing, see <https://www.artifex.com/> or contact
  20. // Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
  21. // CA 94129, USA, for further information.
  22. #define _notdef NULL
  23. const unsigned short fz_unicode_from_pdf_doc_encoding[256] =
  24. {
  25. /* 0x0 to 0x17 except \t, \n and \r are really undefined */
  26. 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
  27. 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
  28. 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
  29. 0x02d8, 0x02c7, 0x02c6, 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc,
  30. 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
  31. 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
  32. 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
  33. 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
  34. 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
  35. 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
  36. 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
  37. 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
  38. 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
  39. 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
  40. 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
  41. 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x007e, 0x0000,
  42. 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x0192, 0x2044,
  43. 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018,
  44. 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x0141, 0x0152, 0x0160,
  45. 0x0178, 0x017d, 0x0131, 0x0142, 0x0153, 0x0161, 0x017e, 0x0000,
  46. 0x20ac, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
  47. 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x0000, 0x00ae, 0x00af,
  48. 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
  49. 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
  50. 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
  51. 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
  52. 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
  53. 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
  54. 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
  55. 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
  56. 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
  57. 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
  58. };
  59. const char *fz_glyph_name_from_adobe_standard[256] = {
  60. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  61. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  62. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  63. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  64. "space", "exclam", "quotedbl", "numbersign", "dollar", "percent",
  65. "ampersand", "quoteright", "parenleft", "parenright", "asterisk",
  66. "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two",
  67. "three", "four", "five", "six", "seven", "eight", "nine", "colon",
  68. "semicolon", "less", "equal", "greater", "question", "at", "A", "B",
  69. "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
  70. "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft",
  71. "backslash", "bracketright", "asciicircum", "underscore", "quoteleft",
  72. "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
  73. "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
  74. "braceleft", "bar", "braceright", "asciitilde", _notdef, _notdef,
  75. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  76. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  77. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  78. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  79. "exclamdown", "cent", "sterling", "fraction", "yen", "florin",
  80. "section", "currency", "quotesingle", "quotedblleft", "guillemotleft",
  81. "guilsinglleft", "guilsinglright", "fi", "fl", _notdef, "endash",
  82. "dagger", "daggerdbl", "periodcentered", _notdef, "paragraph",
  83. "bullet", "quotesinglbase", "quotedblbase", "quotedblright",
  84. "guillemotright", "ellipsis", "perthousand", _notdef, "questiondown",
  85. _notdef, "grave", "acute", "circumflex", "tilde", "macron", "breve",
  86. "dotaccent", "dieresis", _notdef, "ring", "cedilla", _notdef,
  87. "hungarumlaut", "ogonek", "caron", "emdash", _notdef, _notdef, _notdef,
  88. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  89. _notdef, _notdef, _notdef, _notdef, _notdef, "AE", _notdef,
  90. "ordfeminine", _notdef, _notdef, _notdef, _notdef, "Lslash", "Oslash",
  91. "OE", "ordmasculine", _notdef, _notdef, _notdef, _notdef, _notdef,
  92. "ae", _notdef, _notdef, _notdef, "dotlessi", _notdef, _notdef,
  93. "lslash", "oslash", "oe", "germandbls", _notdef, _notdef, _notdef,
  94. _notdef
  95. };
  96. const char *fz_glyph_name_from_mac_roman[256] = {
  97. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  98. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  99. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  100. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  101. "space", "exclam", "quotedbl", "numbersign", "dollar", "percent",
  102. "ampersand", "quotesingle", "parenleft", "parenright", "asterisk",
  103. "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two",
  104. "three", "four", "five", "six", "seven", "eight", "nine", "colon",
  105. "semicolon", "less", "equal", "greater", "question", "at", "A", "B",
  106. "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
  107. "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft",
  108. "backslash", "bracketright", "asciicircum", "underscore", "grave", "a",
  109. "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
  110. "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft",
  111. "bar", "braceright", "asciitilde", _notdef, "Adieresis", "Aring",
  112. "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute",
  113. "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla",
  114. "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave",
  115. "icircumflex", "idieresis", "ntilde", "oacute", "ograve",
  116. "ocircumflex", "odieresis", "otilde", "uacute", "ugrave",
  117. "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling",
  118. "section", "bullet", "paragraph", "germandbls", "registered",
  119. "copyright", "trademark", "acute", "dieresis", _notdef, "AE", "Oslash",
  120. _notdef, "plusminus", _notdef, _notdef, "yen", "mu", _notdef, _notdef,
  121. _notdef, _notdef, _notdef, "ordfeminine", "ordmasculine", _notdef,
  122. "ae", "oslash", "questiondown", "exclamdown", "logicalnot", _notdef,
  123. "florin", _notdef, _notdef, "guillemotleft", "guillemotright",
  124. "ellipsis", "space", "Agrave", "Atilde", "Otilde", "OE", "oe",
  125. "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft",
  126. "quoteright", "divide", _notdef, "ydieresis", "Ydieresis", "fraction",
  127. "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl",
  128. "periodcentered", "quotesinglbase", "quotedblbase", "perthousand",
  129. "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave",
  130. "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute",
  131. "Ocircumflex", _notdef, "Ograve", "Uacute", "Ucircumflex", "Ugrave",
  132. "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent",
  133. "ring", "cedilla", "hungarumlaut", "ogonek", "caron"
  134. };
  135. const char *fz_glyph_name_from_mac_expert[256] = {
  136. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  137. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  138. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  139. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  140. "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle",
  141. "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall",
  142. "parenleftsuperior", "parenrightsuperior", "twodotenleader",
  143. "onedotenleader", "comma", "hyphen", "period", "fraction",
  144. "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle",
  145. "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle",
  146. "eightoldstyle", "nineoldstyle", "colon", "semicolon", _notdef,
  147. "threequartersemdash", _notdef, "questionsmall", _notdef, _notdef,
  148. _notdef, _notdef, "Ethsmall", _notdef, _notdef, "onequarter",
  149. "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths",
  150. "seveneighths", "onethird", "twothirds", _notdef, _notdef, _notdef,
  151. _notdef, _notdef, _notdef, "ff", "fi", "fl", "ffi", "ffl",
  152. "parenleftinferior", _notdef, "parenrightinferior", "Circumflexsmall",
  153. "hypheninferior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall",
  154. "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall",
  155. "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall",
  156. "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall",
  157. "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall",
  158. _notdef, _notdef, "asuperior", "centsuperior", _notdef, _notdef,
  159. _notdef, _notdef, "Aacutesmall", "Agravesmall", "Acircumflexsmall",
  160. "Adieresissmall", "Atildesmall", "Aringsmall", "Ccedillasmall",
  161. "Eacutesmall", "Egravesmall", "Ecircumflexsmall", "Edieresissmall",
  162. "Iacutesmall", "Igravesmall", "Icircumflexsmall", "Idieresissmall",
  163. "Ntildesmall", "Oacutesmall", "Ogravesmall", "Ocircumflexsmall",
  164. "Odieresissmall", "Otildesmall", "Uacutesmall", "Ugravesmall",
  165. "Ucircumflexsmall", "Udieresissmall", _notdef, "eightsuperior",
  166. "fourinferior", "threeinferior", "sixinferior", "eightinferior",
  167. "seveninferior", "Scaronsmall", _notdef, "centinferior", "twoinferior",
  168. _notdef, "Dieresissmall", _notdef, "Caronsmall", "osuperior",
  169. "fiveinferior", _notdef, "commainferior", "periodinferior",
  170. "Yacutesmall", _notdef, "dollarinferior", _notdef, _notdef,
  171. "Thornsmall", _notdef, "nineinferior", "zeroinferior", "Zcaronsmall",
  172. "AEsmall", "Oslashsmall", "questiondownsmall", "oneinferior",
  173. "Lslashsmall", _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  174. "Cedillasmall", _notdef, _notdef, _notdef, _notdef, _notdef, "OEsmall",
  175. "figuredash", "hyphensuperior", _notdef, _notdef, _notdef, _notdef,
  176. "exclamdownsmall", _notdef, "Ydieresissmall", _notdef, "onesuperior",
  177. "twosuperior", "threesuperior", "foursuperior", "fivesuperior",
  178. "sixsuperior", "sevensuperior", "ninesuperior", "zerosuperior",
  179. _notdef, "esuperior", "rsuperior", "tsuperior", _notdef, _notdef,
  180. "isuperior", "ssuperior", "dsuperior", _notdef, _notdef, _notdef,
  181. _notdef, _notdef, "lsuperior", "Ogoneksmall", "Brevesmall",
  182. "Macronsmall", "bsuperior", "nsuperior", "msuperior", "commasuperior",
  183. "periodsuperior", "Dotaccentsmall", "Ringsmall", _notdef, _notdef,
  184. _notdef, _notdef
  185. };
  186. /* All unused codes > 32 map to 'bullet' */
  187. const char *fz_glyph_name_from_win_ansi[256] = {
  188. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  189. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  190. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  191. _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef, _notdef,
  192. "space", "exclam", "quotedbl", "numbersign", "dollar", "percent",
  193. "ampersand", "quotesingle", "parenleft", "parenright", "asterisk",
  194. "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two",
  195. "three", "four", "five", "six", "seven", "eight", "nine", "colon",
  196. "semicolon", "less", "equal", "greater", "question", "at", "A", "B",
  197. "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P",
  198. "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft",
  199. "backslash", "bracketright", "asciicircum", "underscore", "grave", "a",
  200. "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
  201. "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft",
  202. "bar", "braceright", "asciitilde", "bullet", "Euro", "bullet",
  203. "quotesinglbase", "florin", "quotedblbase", "ellipsis", "dagger",
  204. "daggerdbl", "circumflex", "perthousand", "Scaron", "guilsinglleft",
  205. "OE", "bullet", "Zcaron", "bullet", "bullet", "quoteleft",
  206. "quoteright", "quotedblleft", "quotedblright", "bullet", "endash",
  207. "emdash", "tilde", "trademark", "scaron", "guilsinglright", "oe",
  208. "bullet", "zcaron", "Ydieresis", "space", "exclamdown", "cent",
  209. "sterling", "currency", "yen", "brokenbar", "section", "dieresis",
  210. "copyright", "ordfeminine", "guillemotleft", "logicalnot", "hyphen",
  211. "registered", "macron", "degree", "plusminus", "twosuperior",
  212. "threesuperior", "acute", "mu", "paragraph", "periodcentered",
  213. "cedilla", "onesuperior", "ordmasculine", "guillemotright",
  214. "onequarter", "onehalf", "threequarters", "questiondown", "Agrave",
  215. "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring", "AE",
  216. "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Edieresis", "Igrave",
  217. "Iacute", "Icircumflex", "Idieresis", "Eth", "Ntilde", "Ograve",
  218. "Oacute", "Ocircumflex", "Otilde", "Odieresis", "multiply", "Oslash",
  219. "Ugrave", "Uacute", "Ucircumflex", "Udieresis", "Yacute", "Thorn",
  220. "germandbls", "agrave", "aacute", "acircumflex", "atilde", "adieresis",
  221. "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex",
  222. "edieresis", "igrave", "iacute", "icircumflex", "idieresis", "eth",
  223. "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis",
  224. "divide", "oslash", "ugrave", "uacute", "ucircumflex", "udieresis",
  225. "yacute", "thorn", "ydieresis"
  226. };
  227. const unsigned short fz_unicode_from_iso8859_1[256] = {
  228. 0,
  229. 1,
  230. 2,
  231. 3,
  232. 4,
  233. 5,
  234. 6,
  235. 7,
  236. 8,
  237. 9,
  238. 10,
  239. 11,
  240. 12,
  241. 13,
  242. 14,
  243. 15,
  244. 16,
  245. 17,
  246. 18,
  247. 19,
  248. 20,
  249. 21,
  250. 22,
  251. 23,
  252. 24,
  253. 25,
  254. 26,
  255. 27,
  256. 28,
  257. 29,
  258. 30,
  259. 31,
  260. 32,
  261. 33,
  262. 34,
  263. 35,
  264. 36,
  265. 37,
  266. 38,
  267. 39,
  268. 40,
  269. 41,
  270. 42,
  271. 43,
  272. 44,
  273. 45,
  274. 46,
  275. 47,
  276. 48,
  277. 49,
  278. 50,
  279. 51,
  280. 52,
  281. 53,
  282. 54,
  283. 55,
  284. 56,
  285. 57,
  286. 58,
  287. 59,
  288. 60,
  289. 61,
  290. 62,
  291. 63,
  292. 64,
  293. 65,
  294. 66,
  295. 67,
  296. 68,
  297. 69,
  298. 70,
  299. 71,
  300. 72,
  301. 73,
  302. 74,
  303. 75,
  304. 76,
  305. 77,
  306. 78,
  307. 79,
  308. 80,
  309. 81,
  310. 82,
  311. 83,
  312. 84,
  313. 85,
  314. 86,
  315. 87,
  316. 88,
  317. 89,
  318. 90,
  319. 91,
  320. 92,
  321. 93,
  322. 94,
  323. 95,
  324. 96,
  325. 97,
  326. 98,
  327. 99,
  328. 100,
  329. 101,
  330. 102,
  331. 103,
  332. 104,
  333. 105,
  334. 106,
  335. 107,
  336. 108,
  337. 109,
  338. 110,
  339. 111,
  340. 112,
  341. 113,
  342. 114,
  343. 115,
  344. 116,
  345. 117,
  346. 118,
  347. 119,
  348. 120,
  349. 121,
  350. 122,
  351. 123,
  352. 124,
  353. 125,
  354. 126,
  355. 127,
  356. 128,
  357. 129,
  358. 130,
  359. 131,
  360. 132,
  361. 133,
  362. 134,
  363. 135,
  364. 136,
  365. 137,
  366. 138,
  367. 139,
  368. 140,
  369. 141,
  370. 142,
  371. 143,
  372. 144,
  373. 145,
  374. 146,
  375. 147,
  376. 148,
  377. 149,
  378. 150,
  379. 151,
  380. 152,
  381. 153,
  382. 154,
  383. 155,
  384. 156,
  385. 157,
  386. 158,
  387. 159,
  388. 160,
  389. 161,
  390. 162,
  391. 163,
  392. 164,
  393. 165,
  394. 166,
  395. 167,
  396. 168,
  397. 169,
  398. 170,
  399. 171,
  400. 172,
  401. 173,
  402. 174,
  403. 175,
  404. 176,
  405. 177,
  406. 178,
  407. 179,
  408. 180,
  409. 181,
  410. 182,
  411. 183,
  412. 184,
  413. 185,
  414. 186,
  415. 187,
  416. 188,
  417. 189,
  418. 190,
  419. 191,
  420. 192,
  421. 193,
  422. 194,
  423. 195,
  424. 196,
  425. 197,
  426. 198,
  427. 199,
  428. 200,
  429. 201,
  430. 202,
  431. 203,
  432. 204,
  433. 205,
  434. 206,
  435. 207,
  436. 208,
  437. 209,
  438. 210,
  439. 211,
  440. 212,
  441. 213,
  442. 214,
  443. 215,
  444. 216,
  445. 217,
  446. 218,
  447. 219,
  448. 220,
  449. 221,
  450. 222,
  451. 223,
  452. 224,
  453. 225,
  454. 226,
  455. 227,
  456. 228,
  457. 229,
  458. 230,
  459. 231,
  460. 232,
  461. 233,
  462. 234,
  463. 235,
  464. 236,
  465. 237,
  466. 238,
  467. 239,
  468. 240,
  469. 241,
  470. 242,
  471. 243,
  472. 244,
  473. 245,
  474. 246,
  475. 247,
  476. 248,
  477. 249,
  478. 250,
  479. 251,
  480. 252,
  481. 253,
  482. 254,
  483. 255,
  484. };
  485. const char *fz_glyph_name_from_iso8859_1[256] = {
  486. _notdef,
  487. _notdef,
  488. _notdef,
  489. _notdef,
  490. _notdef,
  491. _notdef,
  492. _notdef,
  493. _notdef,
  494. _notdef,
  495. _notdef,
  496. _notdef,
  497. _notdef,
  498. _notdef,
  499. _notdef,
  500. _notdef,
  501. _notdef,
  502. _notdef,
  503. _notdef,
  504. _notdef,
  505. _notdef,
  506. _notdef,
  507. _notdef,
  508. _notdef,
  509. _notdef,
  510. _notdef,
  511. _notdef,
  512. _notdef,
  513. _notdef,
  514. _notdef,
  515. _notdef,
  516. _notdef,
  517. _notdef,
  518. "space",
  519. "exclam",
  520. "quotedbl",
  521. "numbersign",
  522. "dollar",
  523. "percent",
  524. "ampersand",
  525. "quotesingle",
  526. "parenleft",
  527. "parenright",
  528. "asterisk",
  529. "plus",
  530. "comma",
  531. "hyphen",
  532. "period",
  533. "slash",
  534. "zero",
  535. "one",
  536. "two",
  537. "three",
  538. "four",
  539. "five",
  540. "six",
  541. "seven",
  542. "eight",
  543. "nine",
  544. "colon",
  545. "semicolon",
  546. "less",
  547. "equal",
  548. "greater",
  549. "question",
  550. "at",
  551. "A",
  552. "B",
  553. "C",
  554. "D",
  555. "E",
  556. "F",
  557. "G",
  558. "H",
  559. "I",
  560. "J",
  561. "K",
  562. "L",
  563. "M",
  564. "N",
  565. "O",
  566. "P",
  567. "Q",
  568. "R",
  569. "S",
  570. "T",
  571. "U",
  572. "V",
  573. "W",
  574. "X",
  575. "Y",
  576. "Z",
  577. "bracketleft",
  578. "backslash",
  579. "bracketright",
  580. "asciicircum",
  581. "underscore",
  582. "grave",
  583. "a",
  584. "b",
  585. "c",
  586. "d",
  587. "e",
  588. "f",
  589. "g",
  590. "h",
  591. "i",
  592. "j",
  593. "k",
  594. "l",
  595. "m",
  596. "n",
  597. "o",
  598. "p",
  599. "q",
  600. "r",
  601. "s",
  602. "t",
  603. "u",
  604. "v",
  605. "w",
  606. "x",
  607. "y",
  608. "z",
  609. "braceleft",
  610. "bar",
  611. "braceright",
  612. "asciitilde",
  613. "controlDEL",
  614. _notdef,
  615. _notdef,
  616. _notdef,
  617. _notdef,
  618. _notdef,
  619. _notdef,
  620. _notdef,
  621. _notdef,
  622. _notdef,
  623. _notdef,
  624. _notdef,
  625. _notdef,
  626. _notdef,
  627. _notdef,
  628. _notdef,
  629. _notdef,
  630. _notdef,
  631. _notdef,
  632. _notdef,
  633. _notdef,
  634. _notdef,
  635. _notdef,
  636. _notdef,
  637. _notdef,
  638. _notdef,
  639. _notdef,
  640. _notdef,
  641. _notdef,
  642. _notdef,
  643. _notdef,
  644. _notdef,
  645. _notdef,
  646. "nbspace",
  647. "exclamdown",
  648. "cent",
  649. "sterling",
  650. "currency",
  651. "yen",
  652. "brokenbar",
  653. "section",
  654. "dieresis",
  655. "copyright",
  656. "ordfeminine",
  657. "guillemotleft",
  658. "logicalnot",
  659. "sfthyphen",
  660. "registered",
  661. "macron",
  662. "degree",
  663. "plusminus",
  664. "twosuperior",
  665. "threesuperior",
  666. "acute",
  667. "mu",
  668. "paragraph",
  669. "periodcentered",
  670. "cedilla",
  671. "onesuperior",
  672. "ordmasculine",
  673. "guillemotright",
  674. "onequarter",
  675. "onehalf",
  676. "threequarters",
  677. "questiondown",
  678. "Agrave",
  679. "Aacute",
  680. "Acircumflex",
  681. "Atilde",
  682. "Adieresis",
  683. "Aring",
  684. "AE",
  685. "Ccedilla",
  686. "Egrave",
  687. "Eacute",
  688. "Ecircumflex",
  689. "Edieresis",
  690. "Igrave",
  691. "Iacute",
  692. "Icircumflex",
  693. "Idieresis",
  694. "Eth",
  695. "Ntilde",
  696. "Ograve",
  697. "Oacute",
  698. "Ocircumflex",
  699. "Otilde",
  700. "Odieresis",
  701. "multiply",
  702. "Oslash",
  703. "Ugrave",
  704. "Uacute",
  705. "Ucircumflex",
  706. "Udieresis",
  707. "Yacute",
  708. "Thorn",
  709. "germandbls",
  710. "agrave",
  711. "aacute",
  712. "acircumflex",
  713. "atilde",
  714. "adieresis",
  715. "aring",
  716. "ae",
  717. "ccedilla",
  718. "egrave",
  719. "eacute",
  720. "ecircumflex",
  721. "edieresis",
  722. "igrave",
  723. "iacute",
  724. "icircumflex",
  725. "idieresis",
  726. "eth",
  727. "ntilde",
  728. "ograve",
  729. "oacute",
  730. "ocircumflex",
  731. "otilde",
  732. "odieresis",
  733. "divide",
  734. "oslash",
  735. "ugrave",
  736. "uacute",
  737. "ucircumflex",
  738. "udieresis",
  739. "yacute",
  740. "thorn",
  741. "ydieresis",
  742. };
  743. static const struct { unsigned short u, c; } iso8859_1_from_unicode[] = {
  744. {0x00a0,160},
  745. {0x00a1,161},
  746. {0x00a2,162},
  747. {0x00a3,163},
  748. {0x00a4,164},
  749. {0x00a5,165},
  750. {0x00a6,166},
  751. {0x00a7,167},
  752. {0x00a8,168},
  753. {0x00a9,169},
  754. {0x00aa,170},
  755. {0x00ab,171},
  756. {0x00ac,172},
  757. {0x00ad,173},
  758. {0x00ae,174},
  759. {0x00af,175},
  760. {0x00b0,176},
  761. {0x00b1,177},
  762. {0x00b2,178},
  763. {0x00b3,179},
  764. {0x00b4,180},
  765. {0x00b5,181},
  766. {0x00b6,182},
  767. {0x00b7,183},
  768. {0x00b8,184},
  769. {0x00b9,185},
  770. {0x00ba,186},
  771. {0x00bb,187},
  772. {0x00bc,188},
  773. {0x00bd,189},
  774. {0x00be,190},
  775. {0x00bf,191},
  776. {0x00c0,192},
  777. {0x00c1,193},
  778. {0x00c2,194},
  779. {0x00c3,195},
  780. {0x00c4,196},
  781. {0x00c5,197},
  782. {0x00c6,198},
  783. {0x00c7,199},
  784. {0x00c8,200},
  785. {0x00c9,201},
  786. {0x00ca,202},
  787. {0x00cb,203},
  788. {0x00cc,204},
  789. {0x00cd,205},
  790. {0x00ce,206},
  791. {0x00cf,207},
  792. {0x00d0,208},
  793. {0x00d1,209},
  794. {0x00d2,210},
  795. {0x00d3,211},
  796. {0x00d4,212},
  797. {0x00d5,213},
  798. {0x00d6,214},
  799. {0x00d7,215},
  800. {0x00d8,216},
  801. {0x00d9,217},
  802. {0x00da,218},
  803. {0x00db,219},
  804. {0x00dc,220},
  805. {0x00dd,221},
  806. {0x00de,222},
  807. {0x00df,223},
  808. {0x00e0,224},
  809. {0x00e1,225},
  810. {0x00e2,226},
  811. {0x00e3,227},
  812. {0x00e4,228},
  813. {0x00e5,229},
  814. {0x00e6,230},
  815. {0x00e7,231},
  816. {0x00e8,232},
  817. {0x00e9,233},
  818. {0x00ea,234},
  819. {0x00eb,235},
  820. {0x00ec,236},
  821. {0x00ed,237},
  822. {0x00ee,238},
  823. {0x00ef,239},
  824. {0x00f0,240},
  825. {0x00f1,241},
  826. {0x00f2,242},
  827. {0x00f3,243},
  828. {0x00f4,244},
  829. {0x00f5,245},
  830. {0x00f6,246},
  831. {0x00f7,247},
  832. {0x00f8,248},
  833. {0x00f9,249},
  834. {0x00fa,250},
  835. {0x00fb,251},
  836. {0x00fc,252},
  837. {0x00fd,253},
  838. {0x00fe,254},
  839. {0x00ff,255},
  840. };
  841. const unsigned short fz_unicode_from_iso8859_7[256] = {
  842. 0,
  843. 1,
  844. 2,
  845. 3,
  846. 4,
  847. 5,
  848. 6,
  849. 7,
  850. 8,
  851. 9,
  852. 10,
  853. 11,
  854. 12,
  855. 13,
  856. 14,
  857. 15,
  858. 16,
  859. 17,
  860. 18,
  861. 19,
  862. 20,
  863. 21,
  864. 22,
  865. 23,
  866. 24,
  867. 25,
  868. 26,
  869. 27,
  870. 28,
  871. 29,
  872. 30,
  873. 31,
  874. 32,
  875. 33,
  876. 34,
  877. 35,
  878. 36,
  879. 37,
  880. 38,
  881. 39,
  882. 40,
  883. 41,
  884. 42,
  885. 43,
  886. 44,
  887. 45,
  888. 46,
  889. 47,
  890. 48,
  891. 49,
  892. 50,
  893. 51,
  894. 52,
  895. 53,
  896. 54,
  897. 55,
  898. 56,
  899. 57,
  900. 58,
  901. 59,
  902. 60,
  903. 61,
  904. 62,
  905. 63,
  906. 64,
  907. 65,
  908. 66,
  909. 67,
  910. 68,
  911. 69,
  912. 70,
  913. 71,
  914. 72,
  915. 73,
  916. 74,
  917. 75,
  918. 76,
  919. 77,
  920. 78,
  921. 79,
  922. 80,
  923. 81,
  924. 82,
  925. 83,
  926. 84,
  927. 85,
  928. 86,
  929. 87,
  930. 88,
  931. 89,
  932. 90,
  933. 91,
  934. 92,
  935. 93,
  936. 94,
  937. 95,
  938. 96,
  939. 97,
  940. 98,
  941. 99,
  942. 100,
  943. 101,
  944. 102,
  945. 103,
  946. 104,
  947. 105,
  948. 106,
  949. 107,
  950. 108,
  951. 109,
  952. 110,
  953. 111,
  954. 112,
  955. 113,
  956. 114,
  957. 115,
  958. 116,
  959. 117,
  960. 118,
  961. 119,
  962. 120,
  963. 121,
  964. 122,
  965. 123,
  966. 124,
  967. 125,
  968. 126,
  969. 127,
  970. 128,
  971. 129,
  972. 130,
  973. 131,
  974. 132,
  975. 133,
  976. 134,
  977. 135,
  978. 136,
  979. 137,
  980. 138,
  981. 139,
  982. 140,
  983. 141,
  984. 142,
  985. 143,
  986. 144,
  987. 145,
  988. 146,
  989. 147,
  990. 148,
  991. 149,
  992. 150,
  993. 151,
  994. 152,
  995. 153,
  996. 154,
  997. 155,
  998. 156,
  999. 157,
  1000. 158,
  1001. 159,
  1002. 160,
  1003. 8216,
  1004. 8217,
  1005. 163,
  1006. 8364,
  1007. 8367,
  1008. 166,
  1009. 167,
  1010. 168,
  1011. 169,
  1012. 890,
  1013. 171,
  1014. 172,
  1015. 173,
  1016. 0,
  1017. 8213,
  1018. 176,
  1019. 177,
  1020. 178,
  1021. 179,
  1022. 900,
  1023. 901,
  1024. 902,
  1025. 183,
  1026. 904,
  1027. 905,
  1028. 906,
  1029. 187,
  1030. 908,
  1031. 189,
  1032. 910,
  1033. 911,
  1034. 912,
  1035. 913,
  1036. 914,
  1037. 915,
  1038. 916,
  1039. 917,
  1040. 918,
  1041. 919,
  1042. 920,
  1043. 921,
  1044. 922,
  1045. 923,
  1046. 924,
  1047. 925,
  1048. 926,
  1049. 927,
  1050. 928,
  1051. 929,
  1052. 0,
  1053. 931,
  1054. 932,
  1055. 933,
  1056. 934,
  1057. 935,
  1058. 936,
  1059. 937,
  1060. 938,
  1061. 939,
  1062. 940,
  1063. 941,
  1064. 942,
  1065. 943,
  1066. 944,
  1067. 945,
  1068. 946,
  1069. 947,
  1070. 948,
  1071. 949,
  1072. 950,
  1073. 951,
  1074. 952,
  1075. 953,
  1076. 954,
  1077. 955,
  1078. 956,
  1079. 957,
  1080. 958,
  1081. 959,
  1082. 960,
  1083. 961,
  1084. 962,
  1085. 963,
  1086. 964,
  1087. 965,
  1088. 966,
  1089. 967,
  1090. 968,
  1091. 969,
  1092. 970,
  1093. 971,
  1094. 972,
  1095. 973,
  1096. 974,
  1097. 0,
  1098. };
  1099. const char *fz_glyph_name_from_iso8859_7[256] = {
  1100. _notdef,
  1101. _notdef,
  1102. _notdef,
  1103. _notdef,
  1104. _notdef,
  1105. _notdef,
  1106. _notdef,
  1107. _notdef,
  1108. _notdef,
  1109. _notdef,
  1110. _notdef,
  1111. _notdef,
  1112. _notdef,
  1113. _notdef,
  1114. _notdef,
  1115. _notdef,
  1116. _notdef,
  1117. _notdef,
  1118. _notdef,
  1119. _notdef,
  1120. _notdef,
  1121. _notdef,
  1122. _notdef,
  1123. _notdef,
  1124. _notdef,
  1125. _notdef,
  1126. _notdef,
  1127. _notdef,
  1128. _notdef,
  1129. _notdef,
  1130. _notdef,
  1131. _notdef,
  1132. "space",
  1133. "exclam",
  1134. "quotedbl",
  1135. "numbersign",
  1136. "dollar",
  1137. "percent",
  1138. "ampersand",
  1139. "quotesingle",
  1140. "parenleft",
  1141. "parenright",
  1142. "asterisk",
  1143. "plus",
  1144. "comma",
  1145. "hyphen",
  1146. "period",
  1147. "slash",
  1148. "zero",
  1149. "one",
  1150. "two",
  1151. "three",
  1152. "four",
  1153. "five",
  1154. "six",
  1155. "seven",
  1156. "eight",
  1157. "nine",
  1158. "colon",
  1159. "semicolon",
  1160. "less",
  1161. "equal",
  1162. "greater",
  1163. "question",
  1164. "at",
  1165. "A",
  1166. "B",
  1167. "C",
  1168. "D",
  1169. "E",
  1170. "F",
  1171. "G",
  1172. "H",
  1173. "I",
  1174. "J",
  1175. "K",
  1176. "L",
  1177. "M",
  1178. "N",
  1179. "O",
  1180. "P",
  1181. "Q",
  1182. "R",
  1183. "S",
  1184. "T",
  1185. "U",
  1186. "V",
  1187. "W",
  1188. "X",
  1189. "Y",
  1190. "Z",
  1191. "bracketleft",
  1192. "backslash",
  1193. "bracketright",
  1194. "asciicircum",
  1195. "underscore",
  1196. "grave",
  1197. "a",
  1198. "b",
  1199. "c",
  1200. "d",
  1201. "e",
  1202. "f",
  1203. "g",
  1204. "h",
  1205. "i",
  1206. "j",
  1207. "k",
  1208. "l",
  1209. "m",
  1210. "n",
  1211. "o",
  1212. "p",
  1213. "q",
  1214. "r",
  1215. "s",
  1216. "t",
  1217. "u",
  1218. "v",
  1219. "w",
  1220. "x",
  1221. "y",
  1222. "z",
  1223. "braceleft",
  1224. "bar",
  1225. "braceright",
  1226. "asciitilde",
  1227. "controlDEL",
  1228. _notdef,
  1229. _notdef,
  1230. _notdef,
  1231. _notdef,
  1232. _notdef,
  1233. _notdef,
  1234. _notdef,
  1235. _notdef,
  1236. _notdef,
  1237. _notdef,
  1238. _notdef,
  1239. _notdef,
  1240. _notdef,
  1241. _notdef,
  1242. _notdef,
  1243. _notdef,
  1244. _notdef,
  1245. _notdef,
  1246. _notdef,
  1247. _notdef,
  1248. _notdef,
  1249. _notdef,
  1250. _notdef,
  1251. _notdef,
  1252. _notdef,
  1253. _notdef,
  1254. _notdef,
  1255. _notdef,
  1256. _notdef,
  1257. _notdef,
  1258. _notdef,
  1259. _notdef,
  1260. "nbspace",
  1261. "quoteleft",
  1262. "quoteright",
  1263. "sterling",
  1264. "Euro",
  1265. _notdef,
  1266. "brokenbar",
  1267. "section",
  1268. "dieresis",
  1269. "copyright",
  1270. "ypogegrammeni",
  1271. "guillemotleft",
  1272. "logicalnot",
  1273. "sfthyphen",
  1274. _notdef,
  1275. "afii00208",
  1276. "degree",
  1277. "plusminus",
  1278. "twosuperior",
  1279. "threesuperior",
  1280. "tonos",
  1281. "dialytikatonos",
  1282. "Alphatonos",
  1283. "periodcentered",
  1284. "Epsilontonos",
  1285. "Etatonos",
  1286. "Iotatonos",
  1287. "guillemotright",
  1288. "Omicrontonos",
  1289. "onehalf",
  1290. "Upsilontonos",
  1291. "Omegatonos",
  1292. "iotadieresistonos",
  1293. "Alpha",
  1294. "Beta",
  1295. "Gamma",
  1296. "Deltagreek",
  1297. "Epsilon",
  1298. "Zeta",
  1299. "Eta",
  1300. "Theta",
  1301. "Iota",
  1302. "Kappa",
  1303. "Lambda",
  1304. "Mu",
  1305. "Nu",
  1306. "Xi",
  1307. "Omicron",
  1308. "Pi",
  1309. "Rho",
  1310. _notdef,
  1311. "Sigma",
  1312. "Tau",
  1313. "Upsilon",
  1314. "Phi",
  1315. "Chi",
  1316. "Psi",
  1317. "Omegagreek",
  1318. "Iotadieresis",
  1319. "Upsilondieresis",
  1320. "alphatonos",
  1321. "epsilontonos",
  1322. "etatonos",
  1323. "iotatonos",
  1324. "upsilondieresistonos",
  1325. "alpha",
  1326. "beta",
  1327. "gamma",
  1328. "delta",
  1329. "epsilon",
  1330. "zeta",
  1331. "eta",
  1332. "theta",
  1333. "iota",
  1334. "kappa",
  1335. "lambda",
  1336. "mugreek",
  1337. "nu",
  1338. "xi",
  1339. "omicron",
  1340. "pi",
  1341. "rho",
  1342. "sigma1",
  1343. "sigma",
  1344. "tau",
  1345. "upsilon",
  1346. "phi",
  1347. "chi",
  1348. "psi",
  1349. "omega",
  1350. "iotadieresis",
  1351. "upsilondieresis",
  1352. "omicrontonos",
  1353. "upsilontonos",
  1354. "omegatonos",
  1355. _notdef,
  1356. };
  1357. static const struct { unsigned short u, c; } iso8859_7_from_unicode[] = {
  1358. {0x00a0,160},
  1359. {0x00a3,163},
  1360. {0x00a6,166},
  1361. {0x00a7,167},
  1362. {0x00a8,168},
  1363. {0x00a9,169},
  1364. {0x00ab,171},
  1365. {0x00ac,172},
  1366. {0x00ad,173},
  1367. {0x00b0,176},
  1368. {0x00b1,177},
  1369. {0x00b2,178},
  1370. {0x00b3,179},
  1371. {0x00b7,183},
  1372. {0x00bb,187},
  1373. {0x00bd,189},
  1374. {0x037a,170},
  1375. {0x0384,180},
  1376. {0x0385,181},
  1377. {0x0386,182},
  1378. {0x0388,184},
  1379. {0x0389,185},
  1380. {0x038a,186},
  1381. {0x038c,188},
  1382. {0x038e,190},
  1383. {0x038f,191},
  1384. {0x0390,192},
  1385. {0x0391,193},
  1386. {0x0392,194},
  1387. {0x0393,195},
  1388. {0x0394,196},
  1389. {0x0395,197},
  1390. {0x0396,198},
  1391. {0x0397,199},
  1392. {0x0398,200},
  1393. {0x0399,201},
  1394. {0x039a,202},
  1395. {0x039b,203},
  1396. {0x039c,204},
  1397. {0x039d,205},
  1398. {0x039e,206},
  1399. {0x039f,207},
  1400. {0x03a0,208},
  1401. {0x03a1,209},
  1402. {0x03a3,211},
  1403. {0x03a4,212},
  1404. {0x03a5,213},
  1405. {0x03a6,214},
  1406. {0x03a7,215},
  1407. {0x03a8,216},
  1408. {0x03a9,217},
  1409. {0x03aa,218},
  1410. {0x03ab,219},
  1411. {0x03ac,220},
  1412. {0x03ad,221},
  1413. {0x03ae,222},
  1414. {0x03af,223},
  1415. {0x03b0,224},
  1416. {0x03b1,225},
  1417. {0x03b2,226},
  1418. {0x03b3,227},
  1419. {0x03b4,228},
  1420. {0x03b5,229},
  1421. {0x03b6,230},
  1422. {0x03b7,231},
  1423. {0x03b8,232},
  1424. {0x03b9,233},
  1425. {0x03ba,234},
  1426. {0x03bb,235},
  1427. {0x03bc,236},
  1428. {0x03bd,237},
  1429. {0x03be,238},
  1430. {0x03bf,239},
  1431. {0x03c0,240},
  1432. {0x03c1,241},
  1433. {0x03c2,242},
  1434. {0x03c3,243},
  1435. {0x03c4,244},
  1436. {0x03c5,245},
  1437. {0x03c6,246},
  1438. {0x03c7,247},
  1439. {0x03c8,248},
  1440. {0x03c9,249},
  1441. {0x03ca,250},
  1442. {0x03cb,251},
  1443. {0x03cc,252},
  1444. {0x03cd,253},
  1445. {0x03ce,254},
  1446. {0x2015,175},
  1447. {0x2018,161},
  1448. {0x2019,162},
  1449. {0x20ac,164},
  1450. };
  1451. const unsigned short fz_unicode_from_koi8u[256] = {
  1452. 0,
  1453. 1,
  1454. 2,
  1455. 3,
  1456. 4,
  1457. 5,
  1458. 6,
  1459. 7,
  1460. 8,
  1461. 9,
  1462. 10,
  1463. 11,
  1464. 12,
  1465. 13,
  1466. 14,
  1467. 15,
  1468. 16,
  1469. 17,
  1470. 18,
  1471. 19,
  1472. 20,
  1473. 21,
  1474. 22,
  1475. 23,
  1476. 24,
  1477. 25,
  1478. 26,
  1479. 27,
  1480. 28,
  1481. 29,
  1482. 30,
  1483. 31,
  1484. 32,
  1485. 33,
  1486. 34,
  1487. 35,
  1488. 36,
  1489. 37,
  1490. 38,
  1491. 39,
  1492. 40,
  1493. 41,
  1494. 42,
  1495. 43,
  1496. 44,
  1497. 45,
  1498. 46,
  1499. 47,
  1500. 48,
  1501. 49,
  1502. 50,
  1503. 51,
  1504. 52,
  1505. 53,
  1506. 54,
  1507. 55,
  1508. 56,
  1509. 57,
  1510. 58,
  1511. 59,
  1512. 60,
  1513. 61,
  1514. 62,
  1515. 63,
  1516. 64,
  1517. 65,
  1518. 66,
  1519. 67,
  1520. 68,
  1521. 69,
  1522. 70,
  1523. 71,
  1524. 72,
  1525. 73,
  1526. 74,
  1527. 75,
  1528. 76,
  1529. 77,
  1530. 78,
  1531. 79,
  1532. 80,
  1533. 81,
  1534. 82,
  1535. 83,
  1536. 84,
  1537. 85,
  1538. 86,
  1539. 87,
  1540. 88,
  1541. 89,
  1542. 90,
  1543. 91,
  1544. 92,
  1545. 93,
  1546. 94,
  1547. 95,
  1548. 96,
  1549. 97,
  1550. 98,
  1551. 99,
  1552. 100,
  1553. 101,
  1554. 102,
  1555. 103,
  1556. 104,
  1557. 105,
  1558. 106,
  1559. 107,
  1560. 108,
  1561. 109,
  1562. 110,
  1563. 111,
  1564. 112,
  1565. 113,
  1566. 114,
  1567. 115,
  1568. 116,
  1569. 117,
  1570. 118,
  1571. 119,
  1572. 120,
  1573. 121,
  1574. 122,
  1575. 123,
  1576. 124,
  1577. 125,
  1578. 126,
  1579. 127,
  1580. 9472,
  1581. 9474,
  1582. 9484,
  1583. 9488,
  1584. 9492,
  1585. 9496,
  1586. 9500,
  1587. 9508,
  1588. 9516,
  1589. 9524,
  1590. 9532,
  1591. 9600,
  1592. 9604,
  1593. 9608,
  1594. 9612,
  1595. 9616,
  1596. 9617,
  1597. 9618,
  1598. 9619,
  1599. 8992,
  1600. 9632,
  1601. 8729,
  1602. 8730,
  1603. 8776,
  1604. 8804,
  1605. 8805,
  1606. 160,
  1607. 8993,
  1608. 176,
  1609. 178,
  1610. 183,
  1611. 247,
  1612. 9552,
  1613. 9553,
  1614. 9554,
  1615. 1105,
  1616. 1108,
  1617. 9556,
  1618. 1110,
  1619. 1111,
  1620. 9559,
  1621. 9560,
  1622. 9561,
  1623. 9562,
  1624. 9563,
  1625. 1169,
  1626. 9565,
  1627. 9566,
  1628. 9567,
  1629. 9568,
  1630. 9569,
  1631. 1025,
  1632. 1028,
  1633. 9571,
  1634. 1030,
  1635. 1031,
  1636. 9574,
  1637. 9575,
  1638. 9576,
  1639. 9577,
  1640. 9578,
  1641. 1168,
  1642. 9580,
  1643. 169,
  1644. 1102,
  1645. 1072,
  1646. 1073,
  1647. 1094,
  1648. 1076,
  1649. 1077,
  1650. 1092,
  1651. 1075,
  1652. 1093,
  1653. 1080,
  1654. 1081,
  1655. 1082,
  1656. 1083,
  1657. 1084,
  1658. 1085,
  1659. 1086,
  1660. 1087,
  1661. 1103,
  1662. 1088,
  1663. 1089,
  1664. 1090,
  1665. 1091,
  1666. 1078,
  1667. 1074,
  1668. 1100,
  1669. 1099,
  1670. 1079,
  1671. 1096,
  1672. 1101,
  1673. 1097,
  1674. 1095,
  1675. 1098,
  1676. 1070,
  1677. 1040,
  1678. 1041,
  1679. 1062,
  1680. 1044,
  1681. 1045,
  1682. 1060,
  1683. 1043,
  1684. 1061,
  1685. 1048,
  1686. 1049,
  1687. 1050,
  1688. 1051,
  1689. 1052,
  1690. 1053,
  1691. 1054,
  1692. 1055,
  1693. 1071,
  1694. 1056,
  1695. 1057,
  1696. 1058,
  1697. 1059,
  1698. 1046,
  1699. 1042,
  1700. 1068,
  1701. 1067,
  1702. 1047,
  1703. 1064,
  1704. 1069,
  1705. 1065,
  1706. 1063,
  1707. 1066,
  1708. };
  1709. const char *fz_glyph_name_from_koi8u[256] = {
  1710. _notdef,
  1711. _notdef,
  1712. _notdef,
  1713. _notdef,
  1714. _notdef,
  1715. _notdef,
  1716. _notdef,
  1717. _notdef,
  1718. _notdef,
  1719. _notdef,
  1720. _notdef,
  1721. _notdef,
  1722. _notdef,
  1723. _notdef,
  1724. _notdef,
  1725. _notdef,
  1726. _notdef,
  1727. _notdef,
  1728. _notdef,
  1729. _notdef,
  1730. _notdef,
  1731. _notdef,
  1732. _notdef,
  1733. _notdef,
  1734. _notdef,
  1735. _notdef,
  1736. _notdef,
  1737. _notdef,
  1738. _notdef,
  1739. _notdef,
  1740. _notdef,
  1741. _notdef,
  1742. "space",
  1743. "exclam",
  1744. "quotedbl",
  1745. "numbersign",
  1746. "dollar",
  1747. "percent",
  1748. "ampersand",
  1749. "quotesingle",
  1750. "parenleft",
  1751. "parenright",
  1752. "asterisk",
  1753. "plus",
  1754. "comma",
  1755. "hyphen",
  1756. "period",
  1757. "slash",
  1758. "zero",
  1759. "one",
  1760. "two",
  1761. "three",
  1762. "four",
  1763. "five",
  1764. "six",
  1765. "seven",
  1766. "eight",
  1767. "nine",
  1768. "colon",
  1769. "semicolon",
  1770. "less",
  1771. "equal",
  1772. "greater",
  1773. "question",
  1774. "at",
  1775. "A",
  1776. "B",
  1777. "C",
  1778. "D",
  1779. "E",
  1780. "F",
  1781. "G",
  1782. "H",
  1783. "I",
  1784. "J",
  1785. "K",
  1786. "L",
  1787. "M",
  1788. "N",
  1789. "O",
  1790. "P",
  1791. "Q",
  1792. "R",
  1793. "S",
  1794. "T",
  1795. "U",
  1796. "V",
  1797. "W",
  1798. "X",
  1799. "Y",
  1800. "Z",
  1801. "bracketleft",
  1802. "backslash",
  1803. "bracketright",
  1804. "asciicircum",
  1805. "underscore",
  1806. "grave",
  1807. "a",
  1808. "b",
  1809. "c",
  1810. "d",
  1811. "e",
  1812. "f",
  1813. "g",
  1814. "h",
  1815. "i",
  1816. "j",
  1817. "k",
  1818. "l",
  1819. "m",
  1820. "n",
  1821. "o",
  1822. "p",
  1823. "q",
  1824. "r",
  1825. "s",
  1826. "t",
  1827. "u",
  1828. "v",
  1829. "w",
  1830. "x",
  1831. "y",
  1832. "z",
  1833. "braceleft",
  1834. "bar",
  1835. "braceright",
  1836. "asciitilde",
  1837. "controlDEL",
  1838. _notdef,
  1839. _notdef,
  1840. _notdef,
  1841. _notdef,
  1842. _notdef,
  1843. _notdef,
  1844. _notdef,
  1845. _notdef,
  1846. _notdef,
  1847. _notdef,
  1848. _notdef,
  1849. "upblock",
  1850. "dnblock",
  1851. "block",
  1852. "lfblock",
  1853. "rtblock",
  1854. "ltshade",
  1855. "shade",
  1856. "dkshade",
  1857. "integraltop",
  1858. "blacksquare",
  1859. "bulletoperator",
  1860. "radical",
  1861. "approxequal",
  1862. "lessequal",
  1863. "greaterequal",
  1864. "nbspace",
  1865. "integralbottom",
  1866. "degree",
  1867. "twosuperior",
  1868. "periodcentered",
  1869. "divide",
  1870. _notdef,
  1871. _notdef,
  1872. _notdef,
  1873. "afii10071",
  1874. "afii10101",
  1875. _notdef,
  1876. "afii10103",
  1877. "afii10104",
  1878. _notdef,
  1879. _notdef,
  1880. _notdef,
  1881. _notdef,
  1882. _notdef,
  1883. "afii10098",
  1884. _notdef,
  1885. _notdef,
  1886. _notdef,
  1887. _notdef,
  1888. _notdef,
  1889. "Iocyrillic",
  1890. "Ecyrillic",
  1891. _notdef,
  1892. "Icyrillic",
  1893. "Yicyrillic",
  1894. _notdef,
  1895. _notdef,
  1896. _notdef,
  1897. _notdef,
  1898. _notdef,
  1899. "Gheupturncyrillic",
  1900. _notdef,
  1901. "copyright",
  1902. "afii10096",
  1903. "acyrillic",
  1904. "afii10066",
  1905. "afii10088",
  1906. "afii10069",
  1907. "afii10070",
  1908. "afii10086",
  1909. "afii10068",
  1910. "afii10087",
  1911. "afii10074",
  1912. "afii10075",
  1913. "afii10076",
  1914. "afii10077",
  1915. "afii10078",
  1916. "afii10079",
  1917. "afii10080",
  1918. "afii10081",
  1919. "afii10097",
  1920. "afii10082",
  1921. "afii10083",
  1922. "afii10084",
  1923. "afii10085",
  1924. "afii10072",
  1925. "afii10067",
  1926. "afii10094",
  1927. "afii10093",
  1928. "afii10073",
  1929. "afii10090",
  1930. "afii10095",
  1931. "afii10091",
  1932. "afii10089",
  1933. "afii10092",
  1934. "IUcyrillic",
  1935. "Acyrillic",
  1936. "Becyrillic",
  1937. "Tsecyrillic",
  1938. "Decyrillic",
  1939. "Iecyrillic",
  1940. "Efcyrillic",
  1941. "Gecyrillic",
  1942. "Khacyrillic",
  1943. "Iicyrillic",
  1944. "Iishortcyrillic",
  1945. "Kacyrillic",
  1946. "Elcyrillic",
  1947. "Emcyrillic",
  1948. "Encyrillic",
  1949. "Ocyrillic",
  1950. "Pecyrillic",
  1951. "IAcyrillic",
  1952. "Ercyrillic",
  1953. "Escyrillic",
  1954. "Tecyrillic",
  1955. "Ucyrillic",
  1956. "Zhecyrillic",
  1957. "Vecyrillic",
  1958. "Softsigncyrillic",
  1959. "Yericyrillic",
  1960. "Zecyrillic",
  1961. "Shacyrillic",
  1962. "Ereversedcyrillic",
  1963. "Shchacyrillic",
  1964. "Checyrillic",
  1965. "Hardsigncyrillic",
  1966. };
  1967. static const struct { unsigned short u, c; } koi8u_from_unicode[] = {
  1968. {0x00a0,154},
  1969. {0x00a9,191},
  1970. {0x00b0,156},
  1971. {0x00b2,157},
  1972. {0x00b7,158},
  1973. {0x00f7,159},
  1974. {0x0401,179},
  1975. {0x0404,180},
  1976. {0x0406,182},
  1977. {0x0407,183},
  1978. {0x0410,225},
  1979. {0x0411,226},
  1980. {0x0412,247},
  1981. {0x0413,231},
  1982. {0x0414,228},
  1983. {0x0415,229},
  1984. {0x0416,246},
  1985. {0x0417,250},
  1986. {0x0418,233},
  1987. {0x0419,234},
  1988. {0x041a,235},
  1989. {0x041b,236},
  1990. {0x041c,237},
  1991. {0x041d,238},
  1992. {0x041e,239},
  1993. {0x041f,240},
  1994. {0x0420,242},
  1995. {0x0421,243},
  1996. {0x0422,244},
  1997. {0x0423,245},
  1998. {0x0424,230},
  1999. {0x0425,232},
  2000. {0x0426,227},
  2001. {0x0427,254},
  2002. {0x0428,251},
  2003. {0x0429,253},
  2004. {0x042a,255},
  2005. {0x042b,249},
  2006. {0x042c,248},
  2007. {0x042d,252},
  2008. {0x042e,224},
  2009. {0x042f,241},
  2010. {0x0430,193},
  2011. {0x0431,194},
  2012. {0x0432,215},
  2013. {0x0433,199},
  2014. {0x0434,196},
  2015. {0x0435,197},
  2016. {0x0436,214},
  2017. {0x0437,218},
  2018. {0x0438,201},
  2019. {0x0439,202},
  2020. {0x043a,203},
  2021. {0x043b,204},
  2022. {0x043c,205},
  2023. {0x043d,206},
  2024. {0x043e,207},
  2025. {0x043f,208},
  2026. {0x0440,210},
  2027. {0x0441,211},
  2028. {0x0442,212},
  2029. {0x0443,213},
  2030. {0x0444,198},
  2031. {0x0445,200},
  2032. {0x0446,195},
  2033. {0x0447,222},
  2034. {0x0448,219},
  2035. {0x0449,221},
  2036. {0x044a,223},
  2037. {0x044b,217},
  2038. {0x044c,216},
  2039. {0x044d,220},
  2040. {0x044e,192},
  2041. {0x044f,209},
  2042. {0x0451,163},
  2043. {0x0454,164},
  2044. {0x0456,166},
  2045. {0x0457,167},
  2046. {0x0490,189},
  2047. {0x0491,173},
  2048. {0x2219,149},
  2049. {0x221a,150},
  2050. {0x2248,151},
  2051. {0x2264,152},
  2052. {0x2265,153},
  2053. {0x2320,147},
  2054. {0x2321,155},
  2055. {0x2580,139},
  2056. {0x2584,140},
  2057. {0x2588,141},
  2058. {0x258c,142},
  2059. {0x2590,143},
  2060. {0x2591,144},
  2061. {0x2592,145},
  2062. {0x2593,146},
  2063. {0x25a0,148},
  2064. };
  2065. const unsigned short fz_unicode_from_windows_1250[256] = {
  2066. 0,
  2067. 1,
  2068. 2,
  2069. 3,
  2070. 4,
  2071. 5,
  2072. 6,
  2073. 7,
  2074. 8,
  2075. 9,
  2076. 10,
  2077. 11,
  2078. 12,
  2079. 13,
  2080. 14,
  2081. 15,
  2082. 16,
  2083. 17,
  2084. 18,
  2085. 19,
  2086. 20,
  2087. 21,
  2088. 22,
  2089. 23,
  2090. 24,
  2091. 25,
  2092. 26,
  2093. 27,
  2094. 28,
  2095. 29,
  2096. 30,
  2097. 31,
  2098. 32,
  2099. 33,
  2100. 34,
  2101. 35,
  2102. 36,
  2103. 37,
  2104. 38,
  2105. 39,
  2106. 40,
  2107. 41,
  2108. 42,
  2109. 43,
  2110. 44,
  2111. 45,
  2112. 46,
  2113. 47,
  2114. 48,
  2115. 49,
  2116. 50,
  2117. 51,
  2118. 52,
  2119. 53,
  2120. 54,
  2121. 55,
  2122. 56,
  2123. 57,
  2124. 58,
  2125. 59,
  2126. 60,
  2127. 61,
  2128. 62,
  2129. 63,
  2130. 64,
  2131. 65,
  2132. 66,
  2133. 67,
  2134. 68,
  2135. 69,
  2136. 70,
  2137. 71,
  2138. 72,
  2139. 73,
  2140. 74,
  2141. 75,
  2142. 76,
  2143. 77,
  2144. 78,
  2145. 79,
  2146. 80,
  2147. 81,
  2148. 82,
  2149. 83,
  2150. 84,
  2151. 85,
  2152. 86,
  2153. 87,
  2154. 88,
  2155. 89,
  2156. 90,
  2157. 91,
  2158. 92,
  2159. 93,
  2160. 94,
  2161. 95,
  2162. 96,
  2163. 97,
  2164. 98,
  2165. 99,
  2166. 100,
  2167. 101,
  2168. 102,
  2169. 103,
  2170. 104,
  2171. 105,
  2172. 106,
  2173. 107,
  2174. 108,
  2175. 109,
  2176. 110,
  2177. 111,
  2178. 112,
  2179. 113,
  2180. 114,
  2181. 115,
  2182. 116,
  2183. 117,
  2184. 118,
  2185. 119,
  2186. 120,
  2187. 121,
  2188. 122,
  2189. 123,
  2190. 124,
  2191. 125,
  2192. 126,
  2193. 127,
  2194. 8364,
  2195. 0,
  2196. 8218,
  2197. 0,
  2198. 8222,
  2199. 8230,
  2200. 8224,
  2201. 8225,
  2202. 0,
  2203. 8240,
  2204. 352,
  2205. 8249,
  2206. 346,
  2207. 356,
  2208. 381,
  2209. 377,
  2210. 0,
  2211. 8216,
  2212. 8217,
  2213. 8220,
  2214. 8221,
  2215. 8226,
  2216. 8211,
  2217. 8212,
  2218. 0,
  2219. 8482,
  2220. 353,
  2221. 8250,
  2222. 347,
  2223. 357,
  2224. 382,
  2225. 378,
  2226. 160,
  2227. 711,
  2228. 728,
  2229. 321,
  2230. 164,
  2231. 260,
  2232. 166,
  2233. 167,
  2234. 168,
  2235. 169,
  2236. 350,
  2237. 171,
  2238. 172,
  2239. 173,
  2240. 174,
  2241. 379,
  2242. 176,
  2243. 177,
  2244. 731,
  2245. 322,
  2246. 180,
  2247. 181,
  2248. 182,
  2249. 183,
  2250. 184,
  2251. 261,
  2252. 351,
  2253. 187,
  2254. 317,
  2255. 733,
  2256. 318,
  2257. 380,
  2258. 340,
  2259. 193,
  2260. 194,
  2261. 258,
  2262. 196,
  2263. 313,
  2264. 262,
  2265. 199,
  2266. 268,
  2267. 201,
  2268. 280,
  2269. 203,
  2270. 282,
  2271. 205,
  2272. 206,
  2273. 270,
  2274. 272,
  2275. 323,
  2276. 327,
  2277. 211,
  2278. 212,
  2279. 336,
  2280. 214,
  2281. 215,
  2282. 344,
  2283. 366,
  2284. 218,
  2285. 368,
  2286. 220,
  2287. 221,
  2288. 354,
  2289. 223,
  2290. 341,
  2291. 225,
  2292. 226,
  2293. 259,
  2294. 228,
  2295. 314,
  2296. 263,
  2297. 231,
  2298. 269,
  2299. 233,
  2300. 281,
  2301. 235,
  2302. 283,
  2303. 237,
  2304. 238,
  2305. 271,
  2306. 273,
  2307. 324,
  2308. 328,
  2309. 243,
  2310. 244,
  2311. 337,
  2312. 246,
  2313. 247,
  2314. 345,
  2315. 367,
  2316. 250,
  2317. 369,
  2318. 252,
  2319. 253,
  2320. 355,
  2321. 729,
  2322. };
  2323. const char *fz_glyph_name_from_windows_1250[256] = {
  2324. _notdef,
  2325. _notdef,
  2326. _notdef,
  2327. _notdef,
  2328. _notdef,
  2329. _notdef,
  2330. _notdef,
  2331. _notdef,
  2332. _notdef,
  2333. _notdef,
  2334. _notdef,
  2335. _notdef,
  2336. _notdef,
  2337. _notdef,
  2338. _notdef,
  2339. _notdef,
  2340. _notdef,
  2341. _notdef,
  2342. _notdef,
  2343. _notdef,
  2344. _notdef,
  2345. _notdef,
  2346. _notdef,
  2347. _notdef,
  2348. _notdef,
  2349. _notdef,
  2350. _notdef,
  2351. _notdef,
  2352. _notdef,
  2353. _notdef,
  2354. _notdef,
  2355. _notdef,
  2356. "space",
  2357. "exclam",
  2358. "quotedbl",
  2359. "numbersign",
  2360. "dollar",
  2361. "percent",
  2362. "ampersand",
  2363. "quotesingle",
  2364. "parenleft",
  2365. "parenright",
  2366. "asterisk",
  2367. "plus",
  2368. "comma",
  2369. "hyphen",
  2370. "period",
  2371. "slash",
  2372. "zero",
  2373. "one",
  2374. "two",
  2375. "three",
  2376. "four",
  2377. "five",
  2378. "six",
  2379. "seven",
  2380. "eight",
  2381. "nine",
  2382. "colon",
  2383. "semicolon",
  2384. "less",
  2385. "equal",
  2386. "greater",
  2387. "question",
  2388. "at",
  2389. "A",
  2390. "B",
  2391. "C",
  2392. "D",
  2393. "E",
  2394. "F",
  2395. "G",
  2396. "H",
  2397. "I",
  2398. "J",
  2399. "K",
  2400. "L",
  2401. "M",
  2402. "N",
  2403. "O",
  2404. "P",
  2405. "Q",
  2406. "R",
  2407. "S",
  2408. "T",
  2409. "U",
  2410. "V",
  2411. "W",
  2412. "X",
  2413. "Y",
  2414. "Z",
  2415. "bracketleft",
  2416. "backslash",
  2417. "bracketright",
  2418. "asciicircum",
  2419. "underscore",
  2420. "grave",
  2421. "a",
  2422. "b",
  2423. "c",
  2424. "d",
  2425. "e",
  2426. "f",
  2427. "g",
  2428. "h",
  2429. "i",
  2430. "j",
  2431. "k",
  2432. "l",
  2433. "m",
  2434. "n",
  2435. "o",
  2436. "p",
  2437. "q",
  2438. "r",
  2439. "s",
  2440. "t",
  2441. "u",
  2442. "v",
  2443. "w",
  2444. "x",
  2445. "y",
  2446. "z",
  2447. "braceleft",
  2448. "bar",
  2449. "braceright",
  2450. "asciitilde",
  2451. "controlDEL",
  2452. "Euro",
  2453. _notdef,
  2454. "quotesinglbase",
  2455. _notdef,
  2456. "quotedblbase",
  2457. "ellipsis",
  2458. "dagger",
  2459. "daggerdbl",
  2460. _notdef,
  2461. "perthousand",
  2462. "Scaron",
  2463. "guilsinglleft",
  2464. "Sacute",
  2465. "Tcaron",
  2466. "Zcaron",
  2467. "Zacute",
  2468. _notdef,
  2469. "quoteleft",
  2470. "quoteright",
  2471. "quotedblleft",
  2472. "quotedblright",
  2473. "bullet",
  2474. "endash",
  2475. "emdash",
  2476. _notdef,
  2477. "trademark",
  2478. "scaron",
  2479. "guilsinglright",
  2480. "sacute",
  2481. "tcaron",
  2482. "zcaron",
  2483. "zacute",
  2484. "nbspace",
  2485. "caron",
  2486. "breve",
  2487. "Lslash",
  2488. "currency",
  2489. "Aogonek",
  2490. "brokenbar",
  2491. "section",
  2492. "dieresis",
  2493. "copyright",
  2494. "Scedilla",
  2495. "guillemotleft",
  2496. "logicalnot",
  2497. "sfthyphen",
  2498. "registered",
  2499. "Zdot",
  2500. "degree",
  2501. "plusminus",
  2502. "ogonek",
  2503. "lslash",
  2504. "acute",
  2505. "mu",
  2506. "paragraph",
  2507. "periodcentered",
  2508. "cedilla",
  2509. "aogonek",
  2510. "scedilla",
  2511. "guillemotright",
  2512. "Lcaron",
  2513. "hungarumlaut",
  2514. "lcaron",
  2515. "zdot",
  2516. "Racute",
  2517. "Aacute",
  2518. "Acircumflex",
  2519. "Abreve",
  2520. "Adieresis",
  2521. "Lacute",
  2522. "Cacute",
  2523. "Ccedilla",
  2524. "Ccaron",
  2525. "Eacute",
  2526. "Eogonek",
  2527. "Edieresis",
  2528. "Ecaron",
  2529. "Iacute",
  2530. "Icircumflex",
  2531. "Dcaron",
  2532. "Dcroat",
  2533. "Nacute",
  2534. "Ncaron",
  2535. "Oacute",
  2536. "Ocircumflex",
  2537. "Odblacute",
  2538. "Odieresis",
  2539. "multiply",
  2540. "Rcaron",
  2541. "Uring",
  2542. "Uacute",
  2543. "Udblacute",
  2544. "Udieresis",
  2545. "Yacute",
  2546. "Tcedilla",
  2547. "germandbls",
  2548. "racute",
  2549. "aacute",
  2550. "acircumflex",
  2551. "abreve",
  2552. "adieresis",
  2553. "lacute",
  2554. "cacute",
  2555. "ccedilla",
  2556. "ccaron",
  2557. "eacute",
  2558. "eogonek",
  2559. "edieresis",
  2560. "ecaron",
  2561. "iacute",
  2562. "icircumflex",
  2563. "dcaron",
  2564. "dcroat",
  2565. "nacute",
  2566. "ncaron",
  2567. "oacute",
  2568. "ocircumflex",
  2569. "odblacute",
  2570. "odieresis",
  2571. "divide",
  2572. "rcaron",
  2573. "uring",
  2574. "uacute",
  2575. "udblacute",
  2576. "udieresis",
  2577. "yacute",
  2578. "tcedilla",
  2579. "dotaccent",
  2580. };
  2581. static const struct { unsigned short u, c; } windows_1250_from_unicode[] = {
  2582. {0x00a0,160},
  2583. {0x00a4,164},
  2584. {0x00a6,166},
  2585. {0x00a7,167},
  2586. {0x00a8,168},
  2587. {0x00a9,169},
  2588. {0x00ab,171},
  2589. {0x00ac,172},
  2590. {0x00ad,173},
  2591. {0x00ae,174},
  2592. {0x00b0,176},
  2593. {0x00b1,177},
  2594. {0x00b4,180},
  2595. {0x00b5,181},
  2596. {0x00b6,182},
  2597. {0x00b7,183},
  2598. {0x00b8,184},
  2599. {0x00bb,187},
  2600. {0x00c1,193},
  2601. {0x00c2,194},
  2602. {0x00c4,196},
  2603. {0x00c7,199},
  2604. {0x00c9,201},
  2605. {0x00cb,203},
  2606. {0x00cd,205},
  2607. {0x00ce,206},
  2608. {0x00d3,211},
  2609. {0x00d4,212},
  2610. {0x00d6,214},
  2611. {0x00d7,215},
  2612. {0x00da,218},
  2613. {0x00dc,220},
  2614. {0x00dd,221},
  2615. {0x00df,223},
  2616. {0x00e1,225},
  2617. {0x00e2,226},
  2618. {0x00e4,228},
  2619. {0x00e7,231},
  2620. {0x00e9,233},
  2621. {0x00eb,235},
  2622. {0x00ed,237},
  2623. {0x00ee,238},
  2624. {0x00f3,243},
  2625. {0x00f4,244},
  2626. {0x00f6,246},
  2627. {0x00f7,247},
  2628. {0x00fa,250},
  2629. {0x00fc,252},
  2630. {0x00fd,253},
  2631. {0x0102,195},
  2632. {0x0103,227},
  2633. {0x0104,165},
  2634. {0x0105,185},
  2635. {0x0106,198},
  2636. {0x0107,230},
  2637. {0x010c,200},
  2638. {0x010d,232},
  2639. {0x010e,207},
  2640. {0x010f,239},
  2641. {0x0110,208},
  2642. {0x0111,240},
  2643. {0x0118,202},
  2644. {0x0119,234},
  2645. {0x011a,204},
  2646. {0x011b,236},
  2647. {0x0139,197},
  2648. {0x013a,229},
  2649. {0x013d,188},
  2650. {0x013e,190},
  2651. {0x0141,163},
  2652. {0x0142,179},
  2653. {0x0143,209},
  2654. {0x0144,241},
  2655. {0x0147,210},
  2656. {0x0148,242},
  2657. {0x0150,213},
  2658. {0x0151,245},
  2659. {0x0154,192},
  2660. {0x0155,224},
  2661. {0x0158,216},
  2662. {0x0159,248},
  2663. {0x015a,140},
  2664. {0x015b,156},
  2665. {0x015e,170},
  2666. {0x015f,186},
  2667. {0x0160,138},
  2668. {0x0161,154},
  2669. {0x0162,222},
  2670. {0x0163,254},
  2671. {0x0164,141},
  2672. {0x0165,157},
  2673. {0x016e,217},
  2674. {0x016f,249},
  2675. {0x0170,219},
  2676. {0x0171,251},
  2677. {0x0179,143},
  2678. {0x017a,159},
  2679. {0x017b,175},
  2680. {0x017c,191},
  2681. {0x017d,142},
  2682. {0x017e,158},
  2683. {0x02c7,161},
  2684. {0x02d8,162},
  2685. {0x02d9,255},
  2686. {0x02db,178},
  2687. {0x02dd,189},
  2688. {0x2013,150},
  2689. {0x2014,151},
  2690. {0x2018,145},
  2691. {0x2019,146},
  2692. {0x201a,130},
  2693. {0x201c,147},
  2694. {0x201d,148},
  2695. {0x201e,132},
  2696. {0x2020,134},
  2697. {0x2021,135},
  2698. {0x2022,149},
  2699. {0x2026,133},
  2700. {0x2030,137},
  2701. {0x2039,139},
  2702. {0x203a,155},
  2703. {0x20ac,128},
  2704. {0x2122,153},
  2705. };
  2706. const unsigned short fz_unicode_from_windows_1251[256] = {
  2707. 0,
  2708. 1,
  2709. 2,
  2710. 3,
  2711. 4,
  2712. 5,
  2713. 6,
  2714. 7,
  2715. 8,
  2716. 9,
  2717. 10,
  2718. 11,
  2719. 12,
  2720. 13,
  2721. 14,
  2722. 15,
  2723. 16,
  2724. 17,
  2725. 18,
  2726. 19,
  2727. 20,
  2728. 21,
  2729. 22,
  2730. 23,
  2731. 24,
  2732. 25,
  2733. 26,
  2734. 27,
  2735. 28,
  2736. 29,
  2737. 30,
  2738. 31,
  2739. 32,
  2740. 33,
  2741. 34,
  2742. 35,
  2743. 36,
  2744. 37,
  2745. 38,
  2746. 39,
  2747. 40,
  2748. 41,
  2749. 42,
  2750. 43,
  2751. 44,
  2752. 45,
  2753. 46,
  2754. 47,
  2755. 48,
  2756. 49,
  2757. 50,
  2758. 51,
  2759. 52,
  2760. 53,
  2761. 54,
  2762. 55,
  2763. 56,
  2764. 57,
  2765. 58,
  2766. 59,
  2767. 60,
  2768. 61,
  2769. 62,
  2770. 63,
  2771. 64,
  2772. 65,
  2773. 66,
  2774. 67,
  2775. 68,
  2776. 69,
  2777. 70,
  2778. 71,
  2779. 72,
  2780. 73,
  2781. 74,
  2782. 75,
  2783. 76,
  2784. 77,
  2785. 78,
  2786. 79,
  2787. 80,
  2788. 81,
  2789. 82,
  2790. 83,
  2791. 84,
  2792. 85,
  2793. 86,
  2794. 87,
  2795. 88,
  2796. 89,
  2797. 90,
  2798. 91,
  2799. 92,
  2800. 93,
  2801. 94,
  2802. 95,
  2803. 96,
  2804. 97,
  2805. 98,
  2806. 99,
  2807. 100,
  2808. 101,
  2809. 102,
  2810. 103,
  2811. 104,
  2812. 105,
  2813. 106,
  2814. 107,
  2815. 108,
  2816. 109,
  2817. 110,
  2818. 111,
  2819. 112,
  2820. 113,
  2821. 114,
  2822. 115,
  2823. 116,
  2824. 117,
  2825. 118,
  2826. 119,
  2827. 120,
  2828. 121,
  2829. 122,
  2830. 123,
  2831. 124,
  2832. 125,
  2833. 126,
  2834. 127,
  2835. 1026,
  2836. 1027,
  2837. 8218,
  2838. 1107,
  2839. 8222,
  2840. 8230,
  2841. 8224,
  2842. 8225,
  2843. 8364,
  2844. 8240,
  2845. 1033,
  2846. 8249,
  2847. 1034,
  2848. 1036,
  2849. 1035,
  2850. 1039,
  2851. 1106,
  2852. 8216,
  2853. 8217,
  2854. 8220,
  2855. 8221,
  2856. 8226,
  2857. 8211,
  2858. 8212,
  2859. 0,
  2860. 8482,
  2861. 1113,
  2862. 8250,
  2863. 1114,
  2864. 1116,
  2865. 1115,
  2866. 1119,
  2867. 160,
  2868. 1038,
  2869. 1118,
  2870. 1032,
  2871. 164,
  2872. 1168,
  2873. 166,
  2874. 167,
  2875. 1025,
  2876. 169,
  2877. 1028,
  2878. 171,
  2879. 172,
  2880. 173,
  2881. 174,
  2882. 1031,
  2883. 176,
  2884. 177,
  2885. 1030,
  2886. 1110,
  2887. 1169,
  2888. 181,
  2889. 182,
  2890. 183,
  2891. 1105,
  2892. 8470,
  2893. 1108,
  2894. 187,
  2895. 1112,
  2896. 1029,
  2897. 1109,
  2898. 1111,
  2899. 1040,
  2900. 1041,
  2901. 1042,
  2902. 1043,
  2903. 1044,
  2904. 1045,
  2905. 1046,
  2906. 1047,
  2907. 1048,
  2908. 1049,
  2909. 1050,
  2910. 1051,
  2911. 1052,
  2912. 1053,
  2913. 1054,
  2914. 1055,
  2915. 1056,
  2916. 1057,
  2917. 1058,
  2918. 1059,
  2919. 1060,
  2920. 1061,
  2921. 1062,
  2922. 1063,
  2923. 1064,
  2924. 1065,
  2925. 1066,
  2926. 1067,
  2927. 1068,
  2928. 1069,
  2929. 1070,
  2930. 1071,
  2931. 1072,
  2932. 1073,
  2933. 1074,
  2934. 1075,
  2935. 1076,
  2936. 1077,
  2937. 1078,
  2938. 1079,
  2939. 1080,
  2940. 1081,
  2941. 1082,
  2942. 1083,
  2943. 1084,
  2944. 1085,
  2945. 1086,
  2946. 1087,
  2947. 1088,
  2948. 1089,
  2949. 1090,
  2950. 1091,
  2951. 1092,
  2952. 1093,
  2953. 1094,
  2954. 1095,
  2955. 1096,
  2956. 1097,
  2957. 1098,
  2958. 1099,
  2959. 1100,
  2960. 1101,
  2961. 1102,
  2962. 1103,
  2963. };
  2964. const char *fz_glyph_name_from_windows_1251[256] = {
  2965. _notdef,
  2966. _notdef,
  2967. _notdef,
  2968. _notdef,
  2969. _notdef,
  2970. _notdef,
  2971. _notdef,
  2972. _notdef,
  2973. _notdef,
  2974. _notdef,
  2975. _notdef,
  2976. _notdef,
  2977. _notdef,
  2978. _notdef,
  2979. _notdef,
  2980. _notdef,
  2981. _notdef,
  2982. _notdef,
  2983. _notdef,
  2984. _notdef,
  2985. _notdef,
  2986. _notdef,
  2987. _notdef,
  2988. _notdef,
  2989. _notdef,
  2990. _notdef,
  2991. _notdef,
  2992. _notdef,
  2993. _notdef,
  2994. _notdef,
  2995. _notdef,
  2996. _notdef,
  2997. "space",
  2998. "exclam",
  2999. "quotedbl",
  3000. "numbersign",
  3001. "dollar",
  3002. "percent",
  3003. "ampersand",
  3004. "quotesingle",
  3005. "parenleft",
  3006. "parenright",
  3007. "asterisk",
  3008. "plus",
  3009. "comma",
  3010. "hyphen",
  3011. "period",
  3012. "slash",
  3013. "zero",
  3014. "one",
  3015. "two",
  3016. "three",
  3017. "four",
  3018. "five",
  3019. "six",
  3020. "seven",
  3021. "eight",
  3022. "nine",
  3023. "colon",
  3024. "semicolon",
  3025. "less",
  3026. "equal",
  3027. "greater",
  3028. "question",
  3029. "at",
  3030. "A",
  3031. "B",
  3032. "C",
  3033. "D",
  3034. "E",
  3035. "F",
  3036. "G",
  3037. "H",
  3038. "I",
  3039. "J",
  3040. "K",
  3041. "L",
  3042. "M",
  3043. "N",
  3044. "O",
  3045. "P",
  3046. "Q",
  3047. "R",
  3048. "S",
  3049. "T",
  3050. "U",
  3051. "V",
  3052. "W",
  3053. "X",
  3054. "Y",
  3055. "Z",
  3056. "bracketleft",
  3057. "backslash",
  3058. "bracketright",
  3059. "asciicircum",
  3060. "underscore",
  3061. "grave",
  3062. "a",
  3063. "b",
  3064. "c",
  3065. "d",
  3066. "e",
  3067. "f",
  3068. "g",
  3069. "h",
  3070. "i",
  3071. "j",
  3072. "k",
  3073. "l",
  3074. "m",
  3075. "n",
  3076. "o",
  3077. "p",
  3078. "q",
  3079. "r",
  3080. "s",
  3081. "t",
  3082. "u",
  3083. "v",
  3084. "w",
  3085. "x",
  3086. "y",
  3087. "z",
  3088. "braceleft",
  3089. "bar",
  3090. "braceright",
  3091. "asciitilde",
  3092. "controlDEL",
  3093. "Djecyrillic",
  3094. "Gjecyrillic",
  3095. "quotesinglbase",
  3096. "afii10100",
  3097. "quotedblbase",
  3098. "ellipsis",
  3099. "dagger",
  3100. "daggerdbl",
  3101. "Euro",
  3102. "perthousand",
  3103. "Ljecyrillic",
  3104. "guilsinglleft",
  3105. "Njecyrillic",
  3106. "Kjecyrillic",
  3107. "Tshecyrillic",
  3108. "Dzhecyrillic",
  3109. "afii10099",
  3110. "quoteleft",
  3111. "quoteright",
  3112. "quotedblleft",
  3113. "quotedblright",
  3114. "bullet",
  3115. "endash",
  3116. "emdash",
  3117. _notdef,
  3118. "trademark",
  3119. "afii10106",
  3120. "guilsinglright",
  3121. "afii10107",
  3122. "afii10109",
  3123. "afii10108",
  3124. "afii10193",
  3125. "nbspace",
  3126. "Ushortcyrillic",
  3127. "afii10110",
  3128. "Jecyrillic",
  3129. "currency",
  3130. "Gheupturncyrillic",
  3131. "brokenbar",
  3132. "section",
  3133. "Iocyrillic",
  3134. "copyright",
  3135. "Ecyrillic",
  3136. "guillemotleft",
  3137. "logicalnot",
  3138. "sfthyphen",
  3139. "registered",
  3140. "Yicyrillic",
  3141. "degree",
  3142. "plusminus",
  3143. "Icyrillic",
  3144. "afii10103",
  3145. "afii10098",
  3146. "mu",
  3147. "paragraph",
  3148. "periodcentered",
  3149. "afii10071",
  3150. "afii61352",
  3151. "afii10101",
  3152. "guillemotright",
  3153. "afii10105",
  3154. "Dzecyrillic",
  3155. "afii10102",
  3156. "afii10104",
  3157. "Acyrillic",
  3158. "Becyrillic",
  3159. "Vecyrillic",
  3160. "Gecyrillic",
  3161. "Decyrillic",
  3162. "Iecyrillic",
  3163. "Zhecyrillic",
  3164. "Zecyrillic",
  3165. "Iicyrillic",
  3166. "Iishortcyrillic",
  3167. "Kacyrillic",
  3168. "Elcyrillic",
  3169. "Emcyrillic",
  3170. "Encyrillic",
  3171. "Ocyrillic",
  3172. "Pecyrillic",
  3173. "Ercyrillic",
  3174. "Escyrillic",
  3175. "Tecyrillic",
  3176. "Ucyrillic",
  3177. "Efcyrillic",
  3178. "Khacyrillic",
  3179. "Tsecyrillic",
  3180. "Checyrillic",
  3181. "Shacyrillic",
  3182. "Shchacyrillic",
  3183. "Hardsigncyrillic",
  3184. "Yericyrillic",
  3185. "Softsigncyrillic",
  3186. "Ereversedcyrillic",
  3187. "IUcyrillic",
  3188. "IAcyrillic",
  3189. "acyrillic",
  3190. "afii10066",
  3191. "afii10067",
  3192. "afii10068",
  3193. "afii10069",
  3194. "afii10070",
  3195. "afii10072",
  3196. "afii10073",
  3197. "afii10074",
  3198. "afii10075",
  3199. "afii10076",
  3200. "afii10077",
  3201. "afii10078",
  3202. "afii10079",
  3203. "afii10080",
  3204. "afii10081",
  3205. "afii10082",
  3206. "afii10083",
  3207. "afii10084",
  3208. "afii10085",
  3209. "afii10086",
  3210. "afii10087",
  3211. "afii10088",
  3212. "afii10089",
  3213. "afii10090",
  3214. "afii10091",
  3215. "afii10092",
  3216. "afii10093",
  3217. "afii10094",
  3218. "afii10095",
  3219. "afii10096",
  3220. "afii10097",
  3221. };
  3222. static const struct { unsigned short u, c; } windows_1251_from_unicode[] = {
  3223. {0x00a0,160},
  3224. {0x00a4,164},
  3225. {0x00a6,166},
  3226. {0x00a7,167},
  3227. {0x00a9,169},
  3228. {0x00ab,171},
  3229. {0x00ac,172},
  3230. {0x00ad,173},
  3231. {0x00ae,174},
  3232. {0x00b0,176},
  3233. {0x00b1,177},
  3234. {0x00b5,181},
  3235. {0x00b6,182},
  3236. {0x00b7,183},
  3237. {0x00bb,187},
  3238. {0x0401,168},
  3239. {0x0402,128},
  3240. {0x0403,129},
  3241. {0x0404,170},
  3242. {0x0405,189},
  3243. {0x0406,178},
  3244. {0x0407,175},
  3245. {0x0408,163},
  3246. {0x0409,138},
  3247. {0x040a,140},
  3248. {0x040b,142},
  3249. {0x040c,141},
  3250. {0x040e,161},
  3251. {0x040f,143},
  3252. {0x0410,192},
  3253. {0x0411,193},
  3254. {0x0412,194},
  3255. {0x0413,195},
  3256. {0x0414,196},
  3257. {0x0415,197},
  3258. {0x0416,198},
  3259. {0x0417,199},
  3260. {0x0418,200},
  3261. {0x0419,201},
  3262. {0x041a,202},
  3263. {0x041b,203},
  3264. {0x041c,204},
  3265. {0x041d,205},
  3266. {0x041e,206},
  3267. {0x041f,207},
  3268. {0x0420,208},
  3269. {0x0421,209},
  3270. {0x0422,210},
  3271. {0x0423,211},
  3272. {0x0424,212},
  3273. {0x0425,213},
  3274. {0x0426,214},
  3275. {0x0427,215},
  3276. {0x0428,216},
  3277. {0x0429,217},
  3278. {0x042a,218},
  3279. {0x042b,219},
  3280. {0x042c,220},
  3281. {0x042d,221},
  3282. {0x042e,222},
  3283. {0x042f,223},
  3284. {0x0430,224},
  3285. {0x0431,225},
  3286. {0x0432,226},
  3287. {0x0433,227},
  3288. {0x0434,228},
  3289. {0x0435,229},
  3290. {0x0436,230},
  3291. {0x0437,231},
  3292. {0x0438,232},
  3293. {0x0439,233},
  3294. {0x043a,234},
  3295. {0x043b,235},
  3296. {0x043c,236},
  3297. {0x043d,237},
  3298. {0x043e,238},
  3299. {0x043f,239},
  3300. {0x0440,240},
  3301. {0x0441,241},
  3302. {0x0442,242},
  3303. {0x0443,243},
  3304. {0x0444,244},
  3305. {0x0445,245},
  3306. {0x0446,246},
  3307. {0x0447,247},
  3308. {0x0448,248},
  3309. {0x0449,249},
  3310. {0x044a,250},
  3311. {0x044b,251},
  3312. {0x044c,252},
  3313. {0x044d,253},
  3314. {0x044e,254},
  3315. {0x044f,255},
  3316. {0x0451,184},
  3317. {0x0452,144},
  3318. {0x0453,131},
  3319. {0x0454,186},
  3320. {0x0455,190},
  3321. {0x0456,179},
  3322. {0x0457,191},
  3323. {0x0458,188},
  3324. {0x0459,154},
  3325. {0x045a,156},
  3326. {0x045b,158},
  3327. {0x045c,157},
  3328. {0x045e,162},
  3329. {0x045f,159},
  3330. {0x0490,165},
  3331. {0x0491,180},
  3332. {0x2013,150},
  3333. {0x2014,151},
  3334. {0x2018,145},
  3335. {0x2019,146},
  3336. {0x201a,130},
  3337. {0x201c,147},
  3338. {0x201d,148},
  3339. {0x201e,132},
  3340. {0x2020,134},
  3341. {0x2021,135},
  3342. {0x2022,149},
  3343. {0x2026,133},
  3344. {0x2030,137},
  3345. {0x2039,139},
  3346. {0x203a,155},
  3347. {0x20ac,136},
  3348. {0x2116,185},
  3349. {0x2122,153},
  3350. };
  3351. const unsigned short fz_unicode_from_windows_1252[256] = {
  3352. 0,
  3353. 1,
  3354. 2,
  3355. 3,
  3356. 4,
  3357. 5,
  3358. 6,
  3359. 7,
  3360. 8,
  3361. 9,
  3362. 10,
  3363. 11,
  3364. 12,
  3365. 13,
  3366. 14,
  3367. 15,
  3368. 16,
  3369. 17,
  3370. 18,
  3371. 19,
  3372. 20,
  3373. 21,
  3374. 22,
  3375. 23,
  3376. 24,
  3377. 25,
  3378. 26,
  3379. 27,
  3380. 28,
  3381. 29,
  3382. 30,
  3383. 31,
  3384. 32,
  3385. 33,
  3386. 34,
  3387. 35,
  3388. 36,
  3389. 37,
  3390. 38,
  3391. 39,
  3392. 40,
  3393. 41,
  3394. 42,
  3395. 43,
  3396. 44,
  3397. 45,
  3398. 46,
  3399. 47,
  3400. 48,
  3401. 49,
  3402. 50,
  3403. 51,
  3404. 52,
  3405. 53,
  3406. 54,
  3407. 55,
  3408. 56,
  3409. 57,
  3410. 58,
  3411. 59,
  3412. 60,
  3413. 61,
  3414. 62,
  3415. 63,
  3416. 64,
  3417. 65,
  3418. 66,
  3419. 67,
  3420. 68,
  3421. 69,
  3422. 70,
  3423. 71,
  3424. 72,
  3425. 73,
  3426. 74,
  3427. 75,
  3428. 76,
  3429. 77,
  3430. 78,
  3431. 79,
  3432. 80,
  3433. 81,
  3434. 82,
  3435. 83,
  3436. 84,
  3437. 85,
  3438. 86,
  3439. 87,
  3440. 88,
  3441. 89,
  3442. 90,
  3443. 91,
  3444. 92,
  3445. 93,
  3446. 94,
  3447. 95,
  3448. 96,
  3449. 97,
  3450. 98,
  3451. 99,
  3452. 100,
  3453. 101,
  3454. 102,
  3455. 103,
  3456. 104,
  3457. 105,
  3458. 106,
  3459. 107,
  3460. 108,
  3461. 109,
  3462. 110,
  3463. 111,
  3464. 112,
  3465. 113,
  3466. 114,
  3467. 115,
  3468. 116,
  3469. 117,
  3470. 118,
  3471. 119,
  3472. 120,
  3473. 121,
  3474. 122,
  3475. 123,
  3476. 124,
  3477. 125,
  3478. 126,
  3479. 127,
  3480. 8364,
  3481. 0,
  3482. 8218,
  3483. 402,
  3484. 8222,
  3485. 8230,
  3486. 8224,
  3487. 8225,
  3488. 710,
  3489. 8240,
  3490. 352,
  3491. 8249,
  3492. 338,
  3493. 0,
  3494. 381,
  3495. 0,
  3496. 0,
  3497. 8216,
  3498. 8217,
  3499. 8220,
  3500. 8221,
  3501. 8226,
  3502. 8211,
  3503. 8212,
  3504. 732,
  3505. 8482,
  3506. 353,
  3507. 8250,
  3508. 339,
  3509. 0,
  3510. 382,
  3511. 376,
  3512. 160,
  3513. 161,
  3514. 162,
  3515. 163,
  3516. 164,
  3517. 165,
  3518. 166,
  3519. 167,
  3520. 168,
  3521. 169,
  3522. 170,
  3523. 171,
  3524. 172,
  3525. 173,
  3526. 174,
  3527. 175,
  3528. 176,
  3529. 177,
  3530. 178,
  3531. 179,
  3532. 180,
  3533. 181,
  3534. 182,
  3535. 183,
  3536. 184,
  3537. 185,
  3538. 186,
  3539. 187,
  3540. 188,
  3541. 189,
  3542. 190,
  3543. 191,
  3544. 192,
  3545. 193,
  3546. 194,
  3547. 195,
  3548. 196,
  3549. 197,
  3550. 198,
  3551. 199,
  3552. 200,
  3553. 201,
  3554. 202,
  3555. 203,
  3556. 204,
  3557. 205,
  3558. 206,
  3559. 207,
  3560. 208,
  3561. 209,
  3562. 210,
  3563. 211,
  3564. 212,
  3565. 213,
  3566. 214,
  3567. 215,
  3568. 216,
  3569. 217,
  3570. 218,
  3571. 219,
  3572. 220,
  3573. 221,
  3574. 222,
  3575. 223,
  3576. 224,
  3577. 225,
  3578. 226,
  3579. 227,
  3580. 228,
  3581. 229,
  3582. 230,
  3583. 231,
  3584. 232,
  3585. 233,
  3586. 234,
  3587. 235,
  3588. 236,
  3589. 237,
  3590. 238,
  3591. 239,
  3592. 240,
  3593. 241,
  3594. 242,
  3595. 243,
  3596. 244,
  3597. 245,
  3598. 246,
  3599. 247,
  3600. 248,
  3601. 249,
  3602. 250,
  3603. 251,
  3604. 252,
  3605. 253,
  3606. 254,
  3607. 255,
  3608. };
  3609. const char *fz_glyph_name_from_windows_1252[256] = {
  3610. _notdef,
  3611. _notdef,
  3612. _notdef,
  3613. _notdef,
  3614. _notdef,
  3615. _notdef,
  3616. _notdef,
  3617. _notdef,
  3618. _notdef,
  3619. _notdef,
  3620. _notdef,
  3621. _notdef,
  3622. _notdef,
  3623. _notdef,
  3624. _notdef,
  3625. _notdef,
  3626. _notdef,
  3627. _notdef,
  3628. _notdef,
  3629. _notdef,
  3630. _notdef,
  3631. _notdef,
  3632. _notdef,
  3633. _notdef,
  3634. _notdef,
  3635. _notdef,
  3636. _notdef,
  3637. _notdef,
  3638. _notdef,
  3639. _notdef,
  3640. _notdef,
  3641. _notdef,
  3642. "space",
  3643. "exclam",
  3644. "quotedbl",
  3645. "numbersign",
  3646. "dollar",
  3647. "percent",
  3648. "ampersand",
  3649. "quotesingle",
  3650. "parenleft",
  3651. "parenright",
  3652. "asterisk",
  3653. "plus",
  3654. "comma",
  3655. "hyphen",
  3656. "period",
  3657. "slash",
  3658. "zero",
  3659. "one",
  3660. "two",
  3661. "three",
  3662. "four",
  3663. "five",
  3664. "six",
  3665. "seven",
  3666. "eight",
  3667. "nine",
  3668. "colon",
  3669. "semicolon",
  3670. "less",
  3671. "equal",
  3672. "greater",
  3673. "question",
  3674. "at",
  3675. "A",
  3676. "B",
  3677. "C",
  3678. "D",
  3679. "E",
  3680. "F",
  3681. "G",
  3682. "H",
  3683. "I",
  3684. "J",
  3685. "K",
  3686. "L",
  3687. "M",
  3688. "N",
  3689. "O",
  3690. "P",
  3691. "Q",
  3692. "R",
  3693. "S",
  3694. "T",
  3695. "U",
  3696. "V",
  3697. "W",
  3698. "X",
  3699. "Y",
  3700. "Z",
  3701. "bracketleft",
  3702. "backslash",
  3703. "bracketright",
  3704. "asciicircum",
  3705. "underscore",
  3706. "grave",
  3707. "a",
  3708. "b",
  3709. "c",
  3710. "d",
  3711. "e",
  3712. "f",
  3713. "g",
  3714. "h",
  3715. "i",
  3716. "j",
  3717. "k",
  3718. "l",
  3719. "m",
  3720. "n",
  3721. "o",
  3722. "p",
  3723. "q",
  3724. "r",
  3725. "s",
  3726. "t",
  3727. "u",
  3728. "v",
  3729. "w",
  3730. "x",
  3731. "y",
  3732. "z",
  3733. "braceleft",
  3734. "bar",
  3735. "braceright",
  3736. "asciitilde",
  3737. "controlDEL",
  3738. "Euro",
  3739. _notdef,
  3740. "quotesinglbase",
  3741. "florin",
  3742. "quotedblbase",
  3743. "ellipsis",
  3744. "dagger",
  3745. "daggerdbl",
  3746. "circumflex",
  3747. "perthousand",
  3748. "Scaron",
  3749. "guilsinglleft",
  3750. "OE",
  3751. _notdef,
  3752. "Zcaron",
  3753. _notdef,
  3754. _notdef,
  3755. "quoteleft",
  3756. "quoteright",
  3757. "quotedblleft",
  3758. "quotedblright",
  3759. "bullet",
  3760. "endash",
  3761. "emdash",
  3762. "tilde",
  3763. "trademark",
  3764. "scaron",
  3765. "guilsinglright",
  3766. "oe",
  3767. _notdef,
  3768. "zcaron",
  3769. "Ydieresis",
  3770. "nbspace",
  3771. "exclamdown",
  3772. "cent",
  3773. "sterling",
  3774. "currency",
  3775. "yen",
  3776. "brokenbar",
  3777. "section",
  3778. "dieresis",
  3779. "copyright",
  3780. "ordfeminine",
  3781. "guillemotleft",
  3782. "logicalnot",
  3783. "sfthyphen",
  3784. "registered",
  3785. "macron",
  3786. "degree",
  3787. "plusminus",
  3788. "twosuperior",
  3789. "threesuperior",
  3790. "acute",
  3791. "mu",
  3792. "paragraph",
  3793. "periodcentered",
  3794. "cedilla",
  3795. "onesuperior",
  3796. "ordmasculine",
  3797. "guillemotright",
  3798. "onequarter",
  3799. "onehalf",
  3800. "threequarters",
  3801. "questiondown",
  3802. "Agrave",
  3803. "Aacute",
  3804. "Acircumflex",
  3805. "Atilde",
  3806. "Adieresis",
  3807. "Aring",
  3808. "AE",
  3809. "Ccedilla",
  3810. "Egrave",
  3811. "Eacute",
  3812. "Ecircumflex",
  3813. "Edieresis",
  3814. "Igrave",
  3815. "Iacute",
  3816. "Icircumflex",
  3817. "Idieresis",
  3818. "Eth",
  3819. "Ntilde",
  3820. "Ograve",
  3821. "Oacute",
  3822. "Ocircumflex",
  3823. "Otilde",
  3824. "Odieresis",
  3825. "multiply",
  3826. "Oslash",
  3827. "Ugrave",
  3828. "Uacute",
  3829. "Ucircumflex",
  3830. "Udieresis",
  3831. "Yacute",
  3832. "Thorn",
  3833. "germandbls",
  3834. "agrave",
  3835. "aacute",
  3836. "acircumflex",
  3837. "atilde",
  3838. "adieresis",
  3839. "aring",
  3840. "ae",
  3841. "ccedilla",
  3842. "egrave",
  3843. "eacute",
  3844. "ecircumflex",
  3845. "edieresis",
  3846. "igrave",
  3847. "iacute",
  3848. "icircumflex",
  3849. "idieresis",
  3850. "eth",
  3851. "ntilde",
  3852. "ograve",
  3853. "oacute",
  3854. "ocircumflex",
  3855. "otilde",
  3856. "odieresis",
  3857. "divide",
  3858. "oslash",
  3859. "ugrave",
  3860. "uacute",
  3861. "ucircumflex",
  3862. "udieresis",
  3863. "yacute",
  3864. "thorn",
  3865. "ydieresis",
  3866. };
  3867. static const struct { unsigned short u, c; } windows_1252_from_unicode[] = {
  3868. {0x00a0,160},
  3869. {0x00a1,161},
  3870. {0x00a2,162},
  3871. {0x00a3,163},
  3872. {0x00a4,164},
  3873. {0x00a5,165},
  3874. {0x00a6,166},
  3875. {0x00a7,167},
  3876. {0x00a8,168},
  3877. {0x00a9,169},
  3878. {0x00aa,170},
  3879. {0x00ab,171},
  3880. {0x00ac,172},
  3881. {0x00ad,173},
  3882. {0x00ae,174},
  3883. {0x00af,175},
  3884. {0x00b0,176},
  3885. {0x00b1,177},
  3886. {0x00b2,178},
  3887. {0x00b3,179},
  3888. {0x00b4,180},
  3889. {0x00b5,181},
  3890. {0x00b6,182},
  3891. {0x00b7,183},
  3892. {0x00b8,184},
  3893. {0x00b9,185},
  3894. {0x00ba,186},
  3895. {0x00bb,187},
  3896. {0x00bc,188},
  3897. {0x00bd,189},
  3898. {0x00be,190},
  3899. {0x00bf,191},
  3900. {0x00c0,192},
  3901. {0x00c1,193},
  3902. {0x00c2,194},
  3903. {0x00c3,195},
  3904. {0x00c4,196},
  3905. {0x00c5,197},
  3906. {0x00c6,198},
  3907. {0x00c7,199},
  3908. {0x00c8,200},
  3909. {0x00c9,201},
  3910. {0x00ca,202},
  3911. {0x00cb,203},
  3912. {0x00cc,204},
  3913. {0x00cd,205},
  3914. {0x00ce,206},
  3915. {0x00cf,207},
  3916. {0x00d0,208},
  3917. {0x00d1,209},
  3918. {0x00d2,210},
  3919. {0x00d3,211},
  3920. {0x00d4,212},
  3921. {0x00d5,213},
  3922. {0x00d6,214},
  3923. {0x00d7,215},
  3924. {0x00d8,216},
  3925. {0x00d9,217},
  3926. {0x00da,218},
  3927. {0x00db,219},
  3928. {0x00dc,220},
  3929. {0x00dd,221},
  3930. {0x00de,222},
  3931. {0x00df,223},
  3932. {0x00e0,224},
  3933. {0x00e1,225},
  3934. {0x00e2,226},
  3935. {0x00e3,227},
  3936. {0x00e4,228},
  3937. {0x00e5,229},
  3938. {0x00e6,230},
  3939. {0x00e7,231},
  3940. {0x00e8,232},
  3941. {0x00e9,233},
  3942. {0x00ea,234},
  3943. {0x00eb,235},
  3944. {0x00ec,236},
  3945. {0x00ed,237},
  3946. {0x00ee,238},
  3947. {0x00ef,239},
  3948. {0x00f0,240},
  3949. {0x00f1,241},
  3950. {0x00f2,242},
  3951. {0x00f3,243},
  3952. {0x00f4,244},
  3953. {0x00f5,245},
  3954. {0x00f6,246},
  3955. {0x00f7,247},
  3956. {0x00f8,248},
  3957. {0x00f9,249},
  3958. {0x00fa,250},
  3959. {0x00fb,251},
  3960. {0x00fc,252},
  3961. {0x00fd,253},
  3962. {0x00fe,254},
  3963. {0x00ff,255},
  3964. {0x0152,140},
  3965. {0x0153,156},
  3966. {0x0160,138},
  3967. {0x0161,154},
  3968. {0x0178,159},
  3969. {0x017d,142},
  3970. {0x017e,158},
  3971. {0x0192,131},
  3972. {0x02c6,136},
  3973. {0x02dc,152},
  3974. {0x2013,150},
  3975. {0x2014,151},
  3976. {0x2018,145},
  3977. {0x2019,146},
  3978. {0x201a,130},
  3979. {0x201c,147},
  3980. {0x201d,148},
  3981. {0x201e,132},
  3982. {0x2020,134},
  3983. {0x2021,135},
  3984. {0x2022,149},
  3985. {0x2026,133},
  3986. {0x2030,137},
  3987. {0x2039,139},
  3988. {0x203a,155},
  3989. {0x20ac,128},
  3990. {0x2122,153},
  3991. };