From 961f357ef202a44da1f4b315c82ef143a6f51497 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Wed, 7 Oct 2015 11:15:06 +0200 Subject: 2015-10-06 12:51:00 --- tex/context/base/cont-new.mkiv | 5 +- tex/context/base/context-version.pdf | Bin 4187 -> 4190 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/font-lib.mkvi | 12 +- tex/context/base/font-otl.lua | 2 +- tex/context/base/font-otr.lua | 727 +++++++++++---------- tex/context/base/font-oup.lua | 85 ++- tex/context/base/luat-fmt.lua | 25 +- tex/context/base/m-oldotf.mkiv | 83 +++ tex/context/base/status-files.pdf | Bin 24418 -> 24390 bytes tex/context/base/status-lua.pdf | Bin 256324 -> 255896 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 12 files changed, 576 insertions(+), 367 deletions(-) create mode 100644 tex/context/base/m-oldotf.mkiv (limited to 'tex') diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 3f12041ba..85019650e 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,12 +11,13 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2015.10.04 19:25} +\newcontextversion{2015.10.06 12:49} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. -\usemodule[newotf] +% \usemodule[newotf] +\usemodule[oldotf] \unprotect diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index d898fe588..9c67c56ea 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index dd7320992..f529eec31 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.10.04 19:25} +\edef\contextversion{2015.10.06 12:49} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-lib.mkvi b/tex/context/base/font-lib.mkvi index a40f8905a..46de6ee44 100644 --- a/tex/context/base/font-lib.mkvi +++ b/tex/context/base/font-lib.mkvi @@ -47,8 +47,8 @@ \registerctxluafile{font-oti}{1.001} % otf initialization \registerctxluafile{font-ott}{1.001} % otf tables (first) -% \iffalse % use new loader -\iftrue % use old loader +\iffalse % use new loader +% \iftrue % use old loader \registerctxluafile{font-otf}{1.001} % otf main \registerctxluafile{font-otb}{1.001} % otf main base @@ -65,10 +65,18 @@ \registerctxluafile{font-otl}{1.001} % otf replacement \registerctxluafile{font-oto}{1.001} % otb replacement +\doifelsefile{font-otj-new.lua} { + \registerctxluafile{font-otj-new}{1.001} % inj replacement +} { \registerctxluafile{font-otj}{1.001} % inj replacement +} \registerctxluafile{font-oup}{1.001} % otp replacement \registerctxluafile{font-ota}{1.001} +\doifelsefile{font-ots-new.lua} { + \registerctxluafile{font-ots-new}{1.001} % otn replacement +} { \registerctxluafile{font-ots}{1.001} % otn replacement +} \registerctxluafile{font-otd}{1.001} \registerctxluafile{font-otc}{1.001} \registerctxluafile{font-oth}{1.001} diff --git a/tex/context/base/font-otl.lua b/tex/context/base/font-otl.lua index 5a4831835..9058f78c2 100644 --- a/tex/context/base/font-otl.lua +++ b/tex/context/base/font-otl.lua @@ -53,7 +53,7 @@ local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.handlers.otf -otf.version = 3.003 -- beware: also sync font-mis.lua and in mtx-fonts +otf.version = 3.004 -- beware: also sync font-mis.lua and in mtx-fonts otf.cache = containers.define("fonts", "otl", otf.version, true) local otfreaders = otf.readers diff --git a/tex/context/base/font-otr.lua b/tex/context/base/font-otr.lua index 0f22fae5d..49b4565c6 100644 --- a/tex/context/base/font-otr.lua +++ b/tex/context/base/font-otr.lua @@ -258,334 +258,334 @@ local languages = { -- english can stay: macintosh = { [ 0] = "english", - [ 1] = "french", - [ 2] = "german", - [ 3] = "italian", - [ 4] = "dutch", - [ 5] = "swedish", - [ 6] = "spanish", - [ 7] = "danish", - [ 8] = "portuguese", - [ 9] = "norwegian", - [ 10] = "hebrew", - [ 11] = "japanese", - [ 12] = "arabic", - [ 13] = "finnish", - [ 14] = "greek", - [ 15] = "icelandic", - [ 16] = "maltese", - [ 17] = "turkish", - [ 18] = "croatian", - [ 19] = "chinese (traditional)", - [ 20] = "urdu", - [ 21] = "hindi", - [ 22] = "thai", - [ 23] = "korean", - [ 24] = "lithuanian", - [ 25] = "polish", - [ 26] = "hungarian", - [ 27] = "estonian", - [ 28] = "latvian", - [ 29] = "sami", - [ 30] = "faroese", - [ 31] = "farsi/persian", - [ 32] = "russian", - [ 33] = "chinese (simplified)", - [ 34] = "flemish", - [ 35] = "irish gaelic", - [ 36] = "albanian", - [ 37] = "romanian", - [ 38] = "czech", - [ 39] = "slovak", - [ 40] = "slovenian", - [ 41] = "yiddish", - [ 42] = "serbian", - [ 43] = "macedonian", - [ 44] = "bulgarian", - [ 45] = "ukrainian", - [ 46] = "byelorussian", - [ 47] = "uzbek", - [ 48] = "kazakh", - [ 49] = "azerbaijani (cyrillic script)", - [ 50] = "azerbaijani (arabic script)", - [ 51] = "armenian", - [ 52] = "georgian", - [ 53] = "moldavian", - [ 54] = "kirghiz", - [ 55] = "tajiki", - [ 56] = "turkmen", - [ 57] = "mongolian (mongolian script)", - [ 58] = "mongolian (cyrillic script)", - [ 59] = "pashto", - [ 60] = "kurdish", - [ 61] = "kashmiri", - [ 62] = "sindhi", - [ 63] = "tibetan", - [ 64] = "nepali", - [ 65] = "sanskrit", - [ 66] = "marathi", - [ 67] = "bengali", - [ 68] = "assamese", - [ 69] = "gujarati", - [ 70] = "punjabi", - [ 71] = "oriya", - [ 72] = "malayalam", - [ 73] = "kannada", - [ 74] = "tamil", - [ 75] = "telugu", - [ 76] = "sinhalese", - [ 77] = "burmese", - [ 78] = "khmer", - [ 79] = "lao", - [ 80] = "vietnamese", - [ 81] = "indonesian", - [ 82] = "tagalong", - [ 83] = "malay (roman script)", - [ 84] = "malay (arabic script)", - [ 85] = "amharic", - [ 86] = "tigrinya", - [ 87] = "galla", - [ 88] = "somali", - [ 89] = "swahili", - [ 90] = "kinyarwanda/ruanda", - [ 91] = "rundi", - [ 92] = "nyanja/chewa", - [ 93] = "malagasy", - [ 94] = "esperanto", - [128] = "welsh", - [129] = "basque", - [130] = "catalan", - [131] = "latin", - [132] = "quenchua", - [133] = "guarani", - [134] = "aymara", - [135] = "tatar", - [136] = "uighur", - [137] = "dzongkha", - [138] = "javanese (roman script)", - [139] = "sundanese (roman script)", - [140] = "galician", - [141] = "afrikaans", - [142] = "breton", - [143] = "inuktitut", - [144] = "scottish gaelic", - [145] = "manx gaelic", - [146] = "irish gaelic (with dot above)", - [147] = "tongan", - [148] = "greek (polytonic)", - [149] = "greenlandic", - [150] = "azerbaijani (roman script)", + -- [ 1] = "french", + -- [ 2] = "german", + -- [ 3] = "italian", + -- [ 4] = "dutch", + -- [ 5] = "swedish", + -- [ 6] = "spanish", + -- [ 7] = "danish", + -- [ 8] = "portuguese", + -- [ 9] = "norwegian", + -- [ 10] = "hebrew", + -- [ 11] = "japanese", + -- [ 12] = "arabic", + -- [ 13] = "finnish", + -- [ 14] = "greek", + -- [ 15] = "icelandic", + -- [ 16] = "maltese", + -- [ 17] = "turkish", + -- [ 18] = "croatian", + -- [ 19] = "chinese (traditional)", + -- [ 20] = "urdu", + -- [ 21] = "hindi", + -- [ 22] = "thai", + -- [ 23] = "korean", + -- [ 24] = "lithuanian", + -- [ 25] = "polish", + -- [ 26] = "hungarian", + -- [ 27] = "estonian", + -- [ 28] = "latvian", + -- [ 29] = "sami", + -- [ 30] = "faroese", + -- [ 31] = "farsi/persian", + -- [ 32] = "russian", + -- [ 33] = "chinese (simplified)", + -- [ 34] = "flemish", + -- [ 35] = "irish gaelic", + -- [ 36] = "albanian", + -- [ 37] = "romanian", + -- [ 38] = "czech", + -- [ 39] = "slovak", + -- [ 40] = "slovenian", + -- [ 41] = "yiddish", + -- [ 42] = "serbian", + -- [ 43] = "macedonian", + -- [ 44] = "bulgarian", + -- [ 45] = "ukrainian", + -- [ 46] = "byelorussian", + -- [ 47] = "uzbek", + -- [ 48] = "kazakh", + -- [ 49] = "azerbaijani (cyrillic script)", + -- [ 50] = "azerbaijani (arabic script)", + -- [ 51] = "armenian", + -- [ 52] = "georgian", + -- [ 53] = "moldavian", + -- [ 54] = "kirghiz", + -- [ 55] = "tajiki", + -- [ 56] = "turkmen", + -- [ 57] = "mongolian (mongolian script)", + -- [ 58] = "mongolian (cyrillic script)", + -- [ 59] = "pashto", + -- [ 60] = "kurdish", + -- [ 61] = "kashmiri", + -- [ 62] = "sindhi", + -- [ 63] = "tibetan", + -- [ 64] = "nepali", + -- [ 65] = "sanskrit", + -- [ 66] = "marathi", + -- [ 67] = "bengali", + -- [ 68] = "assamese", + -- [ 69] = "gujarati", + -- [ 70] = "punjabi", + -- [ 71] = "oriya", + -- [ 72] = "malayalam", + -- [ 73] = "kannada", + -- [ 74] = "tamil", + -- [ 75] = "telugu", + -- [ 76] = "sinhalese", + -- [ 77] = "burmese", + -- [ 78] = "khmer", + -- [ 79] = "lao", + -- [ 80] = "vietnamese", + -- [ 81] = "indonesian", + -- [ 82] = "tagalong", + -- [ 83] = "malay (roman script)", + -- [ 84] = "malay (arabic script)", + -- [ 85] = "amharic", + -- [ 86] = "tigrinya", + -- [ 87] = "galla", + -- [ 88] = "somali", + -- [ 89] = "swahili", + -- [ 90] = "kinyarwanda/ruanda", + -- [ 91] = "rundi", + -- [ 92] = "nyanja/chewa", + -- [ 93] = "malagasy", + -- [ 94] = "esperanto", + -- [128] = "welsh", + -- [129] = "basque", + -- [130] = "catalan", + -- [131] = "latin", + -- [132] = "quenchua", + -- [133] = "guarani", + -- [134] = "aymara", + -- [135] = "tatar", + -- [136] = "uighur", + -- [137] = "dzongkha", + -- [138] = "javanese (roman script)", + -- [139] = "sundanese (roman script)", + -- [140] = "galician", + -- [141] = "afrikaans", + -- [142] = "breton", + -- [143] = "inuktitut", + -- [144] = "scottish gaelic", + -- [145] = "manx gaelic", + -- [146] = "irish gaelic (with dot above)", + -- [147] = "tongan", + -- [148] = "greek (polytonic)", + -- [149] = "greenlandic", + -- [150] = "azerbaijani (roman script)", }, -- these can stay: iso = { }, -- english can stay: windows = { - [0x0436] = "afrikaans - south africa", - [0x041c] = "albanian - albania", - [0x0484] = "alsatian - france", - [0x045e] = "amharic - ethiopia", - [0x1401] = "arabic - algeria", - [0x3c01] = "arabic - bahrain", - [0x0c01] = "arabic - egypt", - [0x0801] = "arabic - iraq", - [0x2c01] = "arabic - jordan", - [0x3401] = "arabic - kuwait", - [0x3001] = "arabic - lebanon", - [0x1001] = "arabic - libya", - [0x1801] = "arabic - morocco", - [0x2001] = "arabic - oman", - [0x4001] = "arabic - qatar", - [0x0401] = "arabic - saudi arabia", - [0x2801] = "arabic - syria", - [0x1c01] = "arabic - tunisia", - [0x3801] = "arabic - u.a.e.", - [0x2401] = "arabic - yemen", - [0x042b] = "armenian - armenia", - [0x044d] = "assamese - india", - [0x082c] = "azeri (cyrillic) - azerbaijan", - [0x042c] = "azeri (latin) - azerbaijan", - [0x046d] = "bashkir - russia", - [0x042d] = "basque - basque", - [0x0423] = "belarusian - belarus", - [0x0845] = "bengali - bangladesh", - [0x0445] = "bengali - india", - [0x201a] = "bosnian (cyrillic) - bosnia and herzegovina", - [0x141a] = "bosnian (latin) - bosnia and herzegovina", - [0x047e] = "breton - france", - [0x0402] = "bulgarian - bulgaria", - [0x0403] = "catalan - catalan", - [0x0c04] = "chinese - hong kong s.a.r.", - [0x1404] = "chinese - macao s.a.r.", - [0x0804] = "chinese - people's republic of china", - [0x1004] = "chinese - singapore", - [0x0404] = "chinese - taiwan", - [0x0483] = "corsican - france", - [0x041a] = "croatian - croatia", - [0x101a] = "croatian (latin) - bosnia and herzegovina", - [0x0405] = "czech - czech republic", - [0x0406] = "danish - denmark", - [0x048c] = "dari - afghanistan", - [0x0465] = "divehi - maldives", - [0x0813] = "dutch - belgium", - [0x0413] = "dutch - netherlands", - [0x0c09] = "english - australia", - [0x2809] = "english - belize", - [0x1009] = "english - canada", - [0x2409] = "english - caribbean", - [0x4009] = "english - india", - [0x1809] = "english - ireland", - [0x2009] = "english - jamaica", - [0x4409] = "english - malaysia", - [0x1409] = "english - new zealand", - [0x3409] = "english - republic of the philippines", - [0x4809] = "english - singapore", - [0x1c09] = "english - south africa", - [0x2c09] = "english - trinidad and tobago", - [0x0809] = "english - united kingdom", + -- [0x0436] = "afrikaans - south africa", + -- [0x041c] = "albanian - albania", + -- [0x0484] = "alsatian - france", + -- [0x045e] = "amharic - ethiopia", + -- [0x1401] = "arabic - algeria", + -- [0x3c01] = "arabic - bahrain", + -- [0x0c01] = "arabic - egypt", + -- [0x0801] = "arabic - iraq", + -- [0x2c01] = "arabic - jordan", + -- [0x3401] = "arabic - kuwait", + -- [0x3001] = "arabic - lebanon", + -- [0x1001] = "arabic - libya", + -- [0x1801] = "arabic - morocco", + -- [0x2001] = "arabic - oman", + -- [0x4001] = "arabic - qatar", + -- [0x0401] = "arabic - saudi arabia", + -- [0x2801] = "arabic - syria", + -- [0x1c01] = "arabic - tunisia", + -- [0x3801] = "arabic - u.a.e.", + -- [0x2401] = "arabic - yemen", + -- [0x042b] = "armenian - armenia", + -- [0x044d] = "assamese - india", + -- [0x082c] = "azeri (cyrillic) - azerbaijan", + -- [0x042c] = "azeri (latin) - azerbaijan", + -- [0x046d] = "bashkir - russia", + -- [0x042d] = "basque - basque", + -- [0x0423] = "belarusian - belarus", + -- [0x0845] = "bengali - bangladesh", + -- [0x0445] = "bengali - india", + -- [0x201a] = "bosnian (cyrillic) - bosnia and herzegovina", + -- [0x141a] = "bosnian (latin) - bosnia and herzegovina", + -- [0x047e] = "breton - france", + -- [0x0402] = "bulgarian - bulgaria", + -- [0x0403] = "catalan - catalan", + -- [0x0c04] = "chinese - hong kong s.a.r.", + -- [0x1404] = "chinese - macao s.a.r.", + -- [0x0804] = "chinese - people's republic of china", + -- [0x1004] = "chinese - singapore", + -- [0x0404] = "chinese - taiwan", + -- [0x0483] = "corsican - france", + -- [0x041a] = "croatian - croatia", + -- [0x101a] = "croatian (latin) - bosnia and herzegovina", + -- [0x0405] = "czech - czech republic", + -- [0x0406] = "danish - denmark", + -- [0x048c] = "dari - afghanistan", + -- [0x0465] = "divehi - maldives", + -- [0x0813] = "dutch - belgium", + -- [0x0413] = "dutch - netherlands", + -- [0x0c09] = "english - australia", + -- [0x2809] = "english - belize", + -- [0x1009] = "english - canada", + -- [0x2409] = "english - caribbean", + -- [0x4009] = "english - india", + -- [0x1809] = "english - ireland", + -- [0x2009] = "english - jamaica", + -- [0x4409] = "english - malaysia", + -- [0x1409] = "english - new zealand", + -- [0x3409] = "english - republic of the philippines", + -- [0x4809] = "english - singapore", + -- [0x1c09] = "english - south africa", + -- [0x2c09] = "english - trinidad and tobago", + -- [0x0809] = "english - united kingdom", [0x0409] = "english - united states", - [0x3009] = "english - zimbabwe", - [0x0425] = "estonian - estonia", - [0x0438] = "faroese - faroe islands", - [0x0464] = "filipino - philippines", - [0x040b] = "finnish - finland", - [0x080c] = "french - belgium", - [0x0c0c] = "french - canada", - [0x040c] = "french - france", - [0x140c] = "french - luxembourg", - [0x180c] = "french - principality of monoco", - [0x100c] = "french - switzerland", - [0x0462] = "frisian - netherlands", - [0x0456] = "galician - galician", - [0x0437] = "georgian -georgia", - [0x0c07] = "german - austria", - [0x0407] = "german - germany", - [0x1407] = "german - liechtenstein", - [0x1007] = "german - luxembourg", - [0x0807] = "german - switzerland", - [0x0408] = "greek - greece", - [0x046f] = "greenlandic - greenland", - [0x0447] = "gujarati - india", - [0x0468] = "hausa (latin) - nigeria", - [0x040d] = "hebrew - israel", - [0x0439] = "hindi - india", - [0x040e] = "hungarian - hungary", - [0x040f] = "icelandic - iceland", - [0x0470] = "igbo - nigeria", - [0x0421] = "indonesian - indonesia", - [0x045d] = "inuktitut - canada", - [0x085d] = "inuktitut (latin) - canada", - [0x083c] = "irish - ireland", - [0x0434] = "isixhosa - south africa", - [0x0435] = "isizulu - south africa", - [0x0410] = "italian - italy", - [0x0810] = "italian - switzerland", - [0x0411] = "japanese - japan", - [0x044b] = "kannada - india", - [0x043f] = "kazakh - kazakhstan", - [0x0453] = "khmer - cambodia", - [0x0486] = "k'iche - guatemala", - [0x0487] = "kinyarwanda - rwanda", - [0x0441] = "kiswahili - kenya", - [0x0457] = "konkani - india", - [0x0412] = "korean - korea", - [0x0440] = "kyrgyz - kyrgyzstan", - [0x0454] = "lao - lao p.d.r.", - [0x0426] = "latvian - latvia", - [0x0427] = "lithuanian - lithuania", - [0x082e] = "lower sorbian - germany", - [0x046e] = "luxembourgish - luxembourg", - [0x042f] = "macedonian (fyrom) - former yugoslav republic of macedonia", - [0x083e] = "malay - brunei darussalam", - [0x043e] = "malay - malaysia", - [0x044c] = "malayalam - india", - [0x043a] = "maltese - malta", - [0x0481] = "maori - new zealand", - [0x047a] = "mapudungun - chile", - [0x044e] = "marathi - india", - [0x047c] = "mohawk - mohawk", - [0x0450] = "mongolian (cyrillic) - mongolia", - [0x0850] = "mongolian (traditional) - people's republic of china", - [0x0461] = "nepali - nepal", - [0x0414] = "norwegian (bokmal) - norway", - [0x0814] = "norwegian (nynorsk) - norway", - [0x0482] = "occitan - france", - [0x0448] = "odia (formerly oriya) - india", - [0x0463] = "pashto - afghanistan", - [0x0415] = "polish - poland", - [0x0416] = "portuguese - brazil", - [0x0816] = "portuguese - portugal", - [0x0446] = "punjabi - india", - [0x046b] = "quechua - bolivia", - [0x086b] = "quechua - ecuador", - [0x0c6b] = "quechua - peru", - [0x0418] = "romanian - romania", - [0x0417] = "romansh - switzerland", - [0x0419] = "russian - russia", - [0x243b] = "sami (inari) - finland", - [0x103b] = "sami (lule) - norway", - [0x143b] = "sami (lule) - sweden", - [0x0c3b] = "sami (northern) - finland", - [0x043b] = "sami (northern) - norway", - [0x083b] = "sami (northern) - sweden", - [0x203b] = "sami (skolt) - finland", - [0x183b] = "sami (southern) - norway", - [0x1c3b] = "sami (southern) - sweden", - [0x044f] = "sanskrit - india", - [0x1c1a] = "serbian (cyrillic) - bosnia and herzegovina", - [0x0c1a] = "serbian (cyrillic) - serbia", - [0x181a] = "serbian (latin) - bosnia and herzegovina", - [0x081a] = "serbian (latin) - serbia", - [0x046c] = "sesotho sa leboa - south africa", - [0x0432] = "setswana - south africa", - [0x045b] = "sinhala - sri lanka", - [0x041b] = "slovak - slovakia", - [0x0424] = "slovenian - slovenia", - [0x2c0a] = "spanish - argentina", - [0x400a] = "spanish - bolivia", - [0x340a] = "spanish - chile", - [0x240a] = "spanish - colombia", - [0x140a] = "spanish - costa rica", - [0x1c0a] = "spanish - dominican republic", - [0x300a] = "spanish - ecuador", - [0x440a] = "spanish - el salvador", - [0x100a] = "spanish - guatemala", - [0x480a] = "spanish - honduras", - [0x080a] = "spanish - mexico", - [0x4c0a] = "spanish - nicaragua", - [0x180a] = "spanish - panama", - [0x3c0a] = "spanish - paraguay", - [0x280a] = "spanish - peru", - [0x500a] = "spanish - puerto rico", - [0x0c0a] = "spanish (modern sort) - spain", - [0x040a] = "spanish (traditional sort) - spain", - [0x540a] = "spanish - united states", - [0x380a] = "spanish - uruguay", - [0x200a] = "spanish - venezuela", - [0x081d] = "sweden - finland", - [0x041d] = "swedish - sweden", - [0x045a] = "syriac - syria", - [0x0428] = "tajik (cyrillic) - tajikistan", - [0x085f] = "tamazight (latin) - algeria", - [0x0449] = "tamil - india", - [0x0444] = "tatar - russia", - [0x044a] = "telugu - india", - [0x041e] = "thai - thailand", - [0x0451] = "tibetan - prc", - [0x041f] = "turkish - turkey", - [0x0442] = "turkmen - turkmenistan", - [0x0480] = "uighur - prc", - [0x0422] = "ukrainian - ukraine", - [0x042e] = "upper sorbian - germany", - [0x0420] = "urdu - islamic republic of pakistan", - [0x0843] = "uzbek (cyrillic) - uzbekistan", - [0x0443] = "uzbek (latin) - uzbekistan", - [0x042a] = "vietnamese - vietnam", - [0x0452] = "welsh - united kingdom", - [0x0488] = "wolof - senegal", - [0x0485] = "yakut - russia", - [0x0478] = "yi - prc", - [0x046a] = "yoruba - nigeria", + -- [0x3009] = "english - zimbabwe", + -- [0x0425] = "estonian - estonia", + -- [0x0438] = "faroese - faroe islands", + -- [0x0464] = "filipino - philippines", + -- [0x040b] = "finnish - finland", + -- [0x080c] = "french - belgium", + -- [0x0c0c] = "french - canada", + -- [0x040c] = "french - france", + -- [0x140c] = "french - luxembourg", + -- [0x180c] = "french - principality of monoco", + -- [0x100c] = "french - switzerland", + -- [0x0462] = "frisian - netherlands", + -- [0x0456] = "galician - galician", + -- [0x0437] = "georgian -georgia", + -- [0x0c07] = "german - austria", + -- [0x0407] = "german - germany", + -- [0x1407] = "german - liechtenstein", + -- [0x1007] = "german - luxembourg", + -- [0x0807] = "german - switzerland", + -- [0x0408] = "greek - greece", + -- [0x046f] = "greenlandic - greenland", + -- [0x0447] = "gujarati - india", + -- [0x0468] = "hausa (latin) - nigeria", + -- [0x040d] = "hebrew - israel", + -- [0x0439] = "hindi - india", + -- [0x040e] = "hungarian - hungary", + -- [0x040f] = "icelandic - iceland", + -- [0x0470] = "igbo - nigeria", + -- [0x0421] = "indonesian - indonesia", + -- [0x045d] = "inuktitut - canada", + -- [0x085d] = "inuktitut (latin) - canada", + -- [0x083c] = "irish - ireland", + -- [0x0434] = "isixhosa - south africa", + -- [0x0435] = "isizulu - south africa", + -- [0x0410] = "italian - italy", + -- [0x0810] = "italian - switzerland", + -- [0x0411] = "japanese - japan", + -- [0x044b] = "kannada - india", + -- [0x043f] = "kazakh - kazakhstan", + -- [0x0453] = "khmer - cambodia", + -- [0x0486] = "k'iche - guatemala", + -- [0x0487] = "kinyarwanda - rwanda", + -- [0x0441] = "kiswahili - kenya", + -- [0x0457] = "konkani - india", + -- [0x0412] = "korean - korea", + -- [0x0440] = "kyrgyz - kyrgyzstan", + -- [0x0454] = "lao - lao p.d.r.", + -- [0x0426] = "latvian - latvia", + -- [0x0427] = "lithuanian - lithuania", + -- [0x082e] = "lower sorbian - germany", + -- [0x046e] = "luxembourgish - luxembourg", + -- [0x042f] = "macedonian (fyrom) - former yugoslav republic of macedonia", + -- [0x083e] = "malay - brunei darussalam", + -- [0x043e] = "malay - malaysia", + -- [0x044c] = "malayalam - india", + -- [0x043a] = "maltese - malta", + -- [0x0481] = "maori - new zealand", + -- [0x047a] = "mapudungun - chile", + -- [0x044e] = "marathi - india", + -- [0x047c] = "mohawk - mohawk", + -- [0x0450] = "mongolian (cyrillic) - mongolia", + -- [0x0850] = "mongolian (traditional) - people's republic of china", + -- [0x0461] = "nepali - nepal", + -- [0x0414] = "norwegian (bokmal) - norway", + -- [0x0814] = "norwegian (nynorsk) - norway", + -- [0x0482] = "occitan - france", + -- [0x0448] = "odia (formerly oriya) - india", + -- [0x0463] = "pashto - afghanistan", + -- [0x0415] = "polish - poland", + -- [0x0416] = "portuguese - brazil", + -- [0x0816] = "portuguese - portugal", + -- [0x0446] = "punjabi - india", + -- [0x046b] = "quechua - bolivia", + -- [0x086b] = "quechua - ecuador", + -- [0x0c6b] = "quechua - peru", + -- [0x0418] = "romanian - romania", + -- [0x0417] = "romansh - switzerland", + -- [0x0419] = "russian - russia", + -- [0x243b] = "sami (inari) - finland", + -- [0x103b] = "sami (lule) - norway", + -- [0x143b] = "sami (lule) - sweden", + -- [0x0c3b] = "sami (northern) - finland", + -- [0x043b] = "sami (northern) - norway", + -- [0x083b] = "sami (northern) - sweden", + -- [0x203b] = "sami (skolt) - finland", + -- [0x183b] = "sami (southern) - norway", + -- [0x1c3b] = "sami (southern) - sweden", + -- [0x044f] = "sanskrit - india", + -- [0x1c1a] = "serbian (cyrillic) - bosnia and herzegovina", + -- [0x0c1a] = "serbian (cyrillic) - serbia", + -- [0x181a] = "serbian (latin) - bosnia and herzegovina", + -- [0x081a] = "serbian (latin) - serbia", + -- [0x046c] = "sesotho sa leboa - south africa", + -- [0x0432] = "setswana - south africa", + -- [0x045b] = "sinhala - sri lanka", + -- [0x041b] = "slovak - slovakia", + -- [0x0424] = "slovenian - slovenia", + -- [0x2c0a] = "spanish - argentina", + -- [0x400a] = "spanish - bolivia", + -- [0x340a] = "spanish - chile", + -- [0x240a] = "spanish - colombia", + -- [0x140a] = "spanish - costa rica", + -- [0x1c0a] = "spanish - dominican republic", + -- [0x300a] = "spanish - ecuador", + -- [0x440a] = "spanish - el salvador", + -- [0x100a] = "spanish - guatemala", + -- [0x480a] = "spanish - honduras", + -- [0x080a] = "spanish - mexico", + -- [0x4c0a] = "spanish - nicaragua", + -- [0x180a] = "spanish - panama", + -- [0x3c0a] = "spanish - paraguay", + -- [0x280a] = "spanish - peru", + -- [0x500a] = "spanish - puerto rico", + -- [0x0c0a] = "spanish (modern sort) - spain", + -- [0x040a] = "spanish (traditional sort) - spain", + -- [0x540a] = "spanish - united states", + -- [0x380a] = "spanish - uruguay", + -- [0x200a] = "spanish - venezuela", + -- [0x081d] = "sweden - finland", + -- [0x041d] = "swedish - sweden", + -- [0x045a] = "syriac - syria", + -- [0x0428] = "tajik (cyrillic) - tajikistan", + -- [0x085f] = "tamazight (latin) - algeria", + -- [0x0449] = "tamil - india", + -- [0x0444] = "tatar - russia", + -- [0x044a] = "telugu - india", + -- [0x041e] = "thai - thailand", + -- [0x0451] = "tibetan - prc", + -- [0x041f] = "turkish - turkey", + -- [0x0442] = "turkmen - turkmenistan", + -- [0x0480] = "uighur - prc", + -- [0x0422] = "ukrainian - ukraine", + -- [0x042e] = "upper sorbian - germany", + -- [0x0420] = "urdu - islamic republic of pakistan", + -- [0x0843] = "uzbek (cyrillic) - uzbekistan", + -- [0x0443] = "uzbek (latin) - uzbekistan", + -- [0x042a] = "vietnamese - vietnam", + -- [0x0452] = "welsh - united kingdom", + -- [0x0488] = "wolof - senegal", + -- [0x0485] = "yakut - russia", + -- [0x0478] = "yi - prc", + -- [0x046a] = "yoruba - nigeria", }, custom = { }, @@ -1129,6 +1129,7 @@ formatreaders[4] = function(f,fontdata,offset) local indices = { } local mapping = fontdata.mapping local glyphs = fontdata.glyphs + local duplicates = fontdata.duplicates -- for i=1,nofsegments do endchars[i] = readushort(f) @@ -1162,10 +1163,15 @@ formatreaders[4] = function(f,fontdata,offset) if index and index > 0 then local glyph = glyphs[index] if glyph then - if not glyph.unicode then + local gu = glyph.unicode + if not gu then glyph.unicode = unicode + else + -- no duplicates ... weird side effects in lm + end + if not mapping[index] then + mapping[index] = unicode end - mapping[index] = unicode -- report("case 1: %C %04i %s",unicode,index,glyphs[index].name) end end @@ -1179,10 +1185,15 @@ formatreaders[4] = function(f,fontdata,offset) index = mod(index + delta,65536) local glyph = glyphs[index] if glyph then - if not glyph.unicode then + local gu = glyph.unicode + if not gu then glyph.unicode = unicode + else + -- no duplicates ... weird side effects in lm + end + if not mapping[index] then + mapping[index] = unicode end - mapping[index] = unicode -- report("case 2: %C %04i %s",unicode,index,glyphs[index].name) end end @@ -1194,37 +1205,59 @@ end formatreaders[6] = function(f,fontdata,offset) setposition(f,offset+2+2+2) -- skip format length language - local mapping = fontdata.mapping - local glyphs = fontdata.glyphs - local start = readushort(f) - local count = readushort(f) + local mapping = fontdata.mapping + local glyphs = fontdata.glyphs + local duplicates = fontdata.duplicates + local start = readushort(f) + local count = readushort(f) for unicode=start,start+count-1 do local index = readushort(f) if index > 0 then local glyph = glyphs[index] - if not glyph.unicode then - glyph.unicode = unicode + if glyph then + local gu = glyph.unicode + if not gu then + glyph.unicode = unicode + else + -- no duplicates ... weird side effects in lm + end + if not mapping[index] then + mapping[index] = unicode + end end - mapping[index] = unicode end end end formatreaders[12] = function(f,fontdata,offset) setposition(f,offset+2+2+4+4) -- skip format reserved length language - local mapping = fontdata.mapping - local glyphs = fontdata.glyphs - local nofgroups = readulong(f) + local mapping = fontdata.mapping + local glyphs = fontdata.glyphs + local duplicates = fontdata.duplicates + local nofgroups = readulong(f) for i=1,nofgroups do local first = readulong(f) local last = readulong(f) local index = readulong(f) for unicode=first,last do local glyph = glyphs[index] - if not glyph.unicode then - glyph.unicode = unicode + if glyph then + local gu = glyph.unicode + if not gu then + glyph.unicode = unicode + elseif gu ~= unicode then + -- e.g. sourcehan fonts need this + local d = duplicates[gu] + if d then + d[unicode] = true + else + duplicates[gu] = { [unicode] = true } + end + end + if not mapping[index] then + mapping[index] = unicode + end end - mapping[index] = unicode index = index + 1 end end @@ -1307,12 +1340,14 @@ function readers.cmap(f,fontdata,specification) if datatable then local tableoffset = datatable.offset setposition(f,tableoffset) - local version = readushort(f) - local noftables = readushort(f) - local records = { } - local unicodecid = false - local variantcid = false - local variants = { } + local version = readushort(f) + local noftables = readushort(f) + local records = { } + local unicodecid = false + local variantcid = false + local variants = { } + local duplicates = fontdata.duplicates or { } + fontdata.duplicates = duplicates for i=1,noftables do local platform = readushort(f) local encoding = readushort(f) @@ -1371,7 +1406,7 @@ function readers.cmap(f,fontdata,specification) table.sort(list) report("no unicode cmap record loaded, found tables: % t",list) end - checkcmap(f,fontdata,records,0, 5,14) -- variants + checkcmap(f,fontdata,records,0,5,14) -- variants -- fontdata.cidmaps = { version = version, @@ -1901,7 +1936,7 @@ function readers.loadfont(filename,n) resources = { filename = fontdata.filename, private = privateoffset, - duplicates = { }, -- todo + duplicates = fontdata.duplicates or { }, features = fontdata.features or { }, -- we need to add these in the loader sublookups = fontdata.sublookups or { }, -- we need to add these in the loader marks = fontdata.marks or { }, -- we need to add these in the loader diff --git a/tex/context/base/font-oup.lua b/tex/context/base/font-oup.lua index 534bfe42e..c740b5e55 100644 --- a/tex/context/base/font-oup.lua +++ b/tex/context/base/font-oup.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['font-oup'] = { local next, type = next, type local P, R, S = lpeg.P, lpeg.R, lpeg.S local lpegmatch = lpeg.match -local insert, remove = table.insert, table.remove +local insert, remove, copy = table.insert, table.remove, table.copy local formatters = string.formatters local sortedkeys = table.sortedkeys @@ -23,9 +23,12 @@ local trace_markwidth = false trackers.register("otf.markwidth",function(v) t local readers = fonts.handlers.otf.readers local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF -local f_private = formatters["P%05X"] -local f_unicode = formatters["U%05X"] -local f_index = formatters["I%05X"] +local f_private = formatters["P%05X"] +local f_unicode = formatters["U%05X"] +local f_index = formatters["I%05X"] +local f_character = formatters["%C"] + +local doduplicates = true -- can become an option (pseudo feature) local function replaced(list,index,replacement) if type(list) == "number" then @@ -102,6 +105,11 @@ local function unifyresources(fontdata,indices) -- local done = { } -- we need to deal with shared ! -- + local duplicates = doduplicates and resources.duplicates + if duplicates and not next(duplicates) then + duplicates = false + end + -- local function recover(cover) -- can be packed for i=1,#cover do local c = cover[i] @@ -128,6 +136,9 @@ local function unifyresources(fontdata,indices) return t end -- + -- the duplicates need checking (probably only in cjk fonts): currently we only check + -- gsub_single, gsub_alternate and gsub_multiple + -- local function unifythem(sequences) if not sequences then return @@ -146,8 +157,23 @@ local function unifyresources(fontdata,indices) local t1 = done[c] if not t1 then t1 = { } - for g1, d1 in next, c do - t1[indices[g1]] = indices[d1] + if duplicates then + for g1, d1 in next, c do + local ug1 = indices[g1] + local ud1 = indices[d1] + t1[ug1] = ud1 + -- + local dg1 = duplicates[ug1] + if dg1 then + for u in next, dg1 do + t1[u] = ud1 + end + end + end + else + for g1, d1 in next, c do + t1[indices[g1]] = indices[d1] + end end done[c] = t1 end @@ -185,11 +211,28 @@ local function unifyresources(fontdata,indices) local t1 = done[c] if not t1 then t1 = { } - for g1, d1 in next, c do - for i=1,#d1 do - d1[i] = indices[d1[i]] + if duplicates then + for g1, d1 in next, c do + for i=1,#d1 do + d1[i] = indices[d1[i]] + end + local ug1 = indices[g1] + t1[ug1] = d1 + -- + local dg1 = duplicates[ug1] + if dg1 then + for u in next, dg1 do + t1[u] = copy(d1) + end + end + end + else + for g1, d1 in next, c do + for i=1,#d1 do + d1[i] = indices[d1[i]] + end + t1[indices[g1]] = d1 end - t1[indices[g1]] = d1 end done[c] = t1 end @@ -272,6 +315,25 @@ local function unifyresources(fontdata,indices) unifythem(resources.sublookups) end +local function copyduplicates(fontdata) + if doduplicates then + local descriptions = fontdata.descriptions + local resources = fontdata.resources + local duplicates = resources.duplicates + if duplicates then + for u, d in next, duplicates do + local du = descriptions[u] + local t = { f_character(u) } + for u in next, d do + descriptions[u] = copy(du) + t[#t+1] = f_character(u) + end + report("duplicates: % t",t) + end + end + end +end + local ignore = { -- should we fix them? ["notdef"] = true, [".notdef"] = true, @@ -618,12 +680,14 @@ function readers.rehash(fontdata,hashmethod) -- TODO: combine loops in one fontdata.hashmethod = "names" local indices = unifyglyphs(fontdata,true) unifyresources(fontdata,indices) + copyduplicates(fontdata) unifymissing(fontdata) -- stripredundant(fontdata) else fontdata.hashmethod = "unicode" local indices = unifyglyphs(fontdata) unifyresources(fontdata,indices) + copyduplicates(fontdata) unifymissing(fontdata) stripredundant(fontdata) end @@ -635,6 +699,7 @@ function readers.checkhash(fontdata) fontdata.names = nil -- just to be sure elseif hashmethod == "names" and fontdata.names then unifyresources(fontdata,fontdata.names) + copyduplicates(fontdata) fontdata.hashmethod = "unicode" fontdata.names = nil -- no need for it else diff --git a/tex/context/base/luat-fmt.lua b/tex/context/base/luat-fmt.lua index 92c1dd6c4..9a86ef50e 100644 --- a/tex/context/base/luat-fmt.lua +++ b/tex/context/base/luat-fmt.lua @@ -29,7 +29,10 @@ local function primaryflags() -- not yet ok return concat(flags," ") end -function environment.make_format(name) +-- The silent option is Taco. It's a bit of a hack because we cannot yet mess +-- with directives. In fact, I could probably clean up the maker a bit by now. + +function environment.make_format(name,silent) local engine = environment.ownmain or "luatex" -- change to format path (early as we need expanded paths) local olddir = dir.current() @@ -93,9 +96,23 @@ function environment.make_format(name) return end -- generate format - local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),os.platform == "unix" and "\\\\" or "\\") - report_format("running command: %s\n",command) - os.execute(command) + local dump = os.platform=="unix" and "\\\\dump" or "\\dump" + if silent then + statistics.starttiming() + local command = format("%s --ini --interaction=batchmode %s --lua=%s %s %s > temp.log",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump) + local result = os.execute(command) + local runtime = statistics.stoptiming() + if result ~= 0 then + print(format("%s silent make > fatal error when making format %q",engine,name)) -- we use a basic print + else + print(format("%s silent make > format %q made in %.3f seconds",engine,name,runtime)) -- we use a basic print + end + os.remove("temp.log") + else + local command = format("%s --ini %s --lua=%s %s %sdump",engine,primaryflags(),quoted(usedluastub),quoted(fulltexsourcename),dump) + report_format("running command: %s\n",command) + os.execute(command) + end -- remove related mem files local pattern = file.removesuffix(file.basename(usedluastub)).."-*.mem" -- report_format("removing related mplib format with pattern %a", pattern) diff --git a/tex/context/base/m-oldotf.mkiv b/tex/context/base/m-oldotf.mkiv new file mode 100644 index 000000000..04a83a47b --- /dev/null +++ b/tex/context/base/m-oldotf.mkiv @@ -0,0 +1,83 @@ +%D \module +%D [ file=m-oldotf, +%D version=2015.07.08, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Traditional OTF Loader, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% \endinput + +%D This module will go away as soon as we use the new loader code by default. +%D That will happen after extensive testing. Generic support will happen after +%D that. + +\unprotect + +\startluacode + local files = { + "font-otf", + "font-otb", + "font-inj", + "font-ota", + "font-otn", + "font-otd", + "font-otp", + "font-otc", + "font-oth", + "font-odv", + "font-map", + "font-fbk", + "font-gds", + } + local report = logs.reporter("oldotf") + local findfile = resolvers.findfile + local addsuffix = file.addsuffix + report() + report("using traditional font loader code") + report() + for i=1,#files do + local foundfile = findfile(addsuffix(files[i],"lua")) + if foundfile and foundfile ~= "" then + report("loading %a",foundfile) + dofile(foundfile) + end + end + report() + + -- needed for testing: + + local nuts = nodes.nuts + local copy_node = nuts.copy + local kern = nuts.pool.register(nuts.pool.kern()) + local setfield = nuts.setfield + + nuts.setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared + + nodes.injections.installnewkern(function(k) + local c = copy_node(kern) + setfield(c,"kern",k) + return c + end) + + directives.register("nodes.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end) + + local fonts = fonts + local handlers = fonts.handlers + local otf = handlers.otf -- brrr + local afm = handlers.afm -- brrr + local getters = fonts.getters + + getters.kern .opentype = otf.getkern + getters.substitution.opentype = otf.getsubstitution + getters.alternate .opentype = otf.getalternate + getters.multiple .opentype = otf.getmultiple + +\stopluacode + +\protect \endinput diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 79d581f27..2609ba4d4 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index efb631bc8..d7249ac2d 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 2fd824467..ddbfffb17 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/04/15 19:25:05 +-- merge date : 10/06/15 12:49:17 do -- begin closure to overcome local limits and interference -- cgit v1.2.3