summaryrefslogtreecommitdiff
path: root/tex/context/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/fonts')
-rw-r--r--tex/context/fonts/ebgaramond.lfg53
-rw-r--r--tex/context/fonts/euler-math.lfg23
-rw-r--r--tex/context/fonts/lm.lfg7
-rw-r--r--tex/context/fonts/px-math.lfg2
-rw-r--r--tex/context/fonts/treatments.lfg59
-rw-r--r--tex/context/fonts/unifraktur.lfg23
6 files changed, 158 insertions, 9 deletions
diff --git a/tex/context/fonts/ebgaramond.lfg b/tex/context/fonts/ebgaramond.lfg
new file mode 100644
index 000000000..43cc13c51
--- /dev/null
+++ b/tex/context/fonts/ebgaramond.lfg
@@ -0,0 +1,53 @@
+return {
+ name = "eb garamond",
+ version = "1.00",
+ comment = "Goodies that complement eb garamond.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ designsizes = {
+ ["EBGaramond-Italic"] = {
+ ["8pt"] = "file:EBGaramond08-Italic",
+ ["9pt"] = "file:EBGaramond08-Italic",
+ ["9.5pt"] = "file:EBGaramond08-Italic",
+ ["10pt"] = "file:EBGaramond12-Italic",
+ ["11pt"] = "file:EBGaramond12-Italic",
+ ["12pt"] = "file:EBGaramond12-Italic",
+ default = "file:EBGaramond12-Italic",
+ },
+ ["EBGaramond-Regular"] = {
+ ["8pt"] = "file:EBGaramond08-Regular",
+ ["9pt"] = "file:EBGaramond08-Regular",
+ ["9.5pt"] = "file:EBGaramond08-Regular",
+ ["10pt"] = "file:EBGaramond12-Regular",
+ ["11pt"] = "file:EBGaramond12-Regular",
+ ["12pt"] = "file:EBGaramond12-Regular",
+ default = "file:EBGaramond12-Regular",
+ },
+ ["EBGaramond-SC"] = {
+ ["8pt"] = "file:EBGaramond08-SC",
+ ["9pt"] = "file:EBGaramond08-SC",
+ ["9.5pt"] = "file:EBGaramond08-SC",
+ ["10pt"] = "file:EBGaramond12-SC",
+ ["11pt"] = "file:EBGaramond12-SC",
+ ["12pt"] = "file:EBGaramond12-SC",
+ default = "file:EBGaramond12-SC",
+ },
+ ["EBGaramond-Bold"] = {
+ default = "file:EBGaramond12-Bold",
+ },
+ ["EBGaramond-AllSC"] = {
+ default = "file:EBGaramond12-AllSC",
+ },
+ ["EBGaramond-Initials"] = {
+ default = "file:EBGaramondInitials",
+ },
+ ["EBGaramond-InitialsF1"] = {
+ default = "file:EBGaramondInitialsF1",
+ },
+ ["EBGaramond-InitialsF2"] = {
+ default = "file:EBGaramondInitialsF2",
+ },
+ }
+}
+
+
diff --git a/tex/context/fonts/euler-math.lfg b/tex/context/fonts/euler-math.lfg
new file mode 100644
index 000000000..da7647c53
--- /dev/null
+++ b/tex/context/fonts/euler-math.lfg
@@ -0,0 +1,23 @@
+-- this file might go away and is for experiments only
+
+return {
+ name = "euler-math",
+ version = "1.00",
+ comment = "Goodies that complement euler math.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ mathematics = {
+ -- virtuals = {
+ -- ["euler-nova"] = {
+ -- { name = "texgyrepagella-math.otf", main = true, parameters = true },
+ -- { name = "euler.otf", overlay = true }, -- first = 0x1234, last = 0x1256
+ --
+ -- -- { name = "euler.otf", main = true, parameters = true },
+ -- -- { name = "texgyrepagella-math.otf", overlay = true },
+ --
+ -- },
+ -- }
+ }
+}
+
+
diff --git a/tex/context/fonts/lm.lfg b/tex/context/fonts/lm.lfg
index 792e723e8..8d7614718 100644
--- a/tex/context/fonts/lm.lfg
+++ b/tex/context/fonts/lm.lfg
@@ -1,4 +1,4 @@
--- In order to be ale to use beta math fonts, we use our own file name and
+-- In order to be able to use beta math fonts, we use our own file name and
-- always remap.
return {
@@ -11,12 +11,13 @@ return {
tweaks = {
aftercopying = {
mathematics.tweaks.fixbadprime, -- prime is too low
+ -- mathematics.tweaks.fixoverline,
},
},
dimensions = {
-- always applied
--- default = {
--- },
+ -- default = {
+ -- },
-- driven by 'mathdimensions' feature
signs = {
-- set dimensions
diff --git a/tex/context/fonts/px-math.lfg b/tex/context/fonts/px-math.lfg
index 2996a55e5..14f71dad3 100644
--- a/tex/context/fonts/px-math.lfg
+++ b/tex/context/fonts/px-math.lfg
@@ -10,7 +10,7 @@ return {
},
virtuals = {
["px-math"] = {
- { name = "texgyrepagella-regular.otf", features = "virtualmath", main = true },
+ { name = "texgyre-pagella-math-regular.otf", features = "virtualmath", main = true },
{ name = "texgyrepagella-regular.otf", features = "virtualmath", vector = "tex-mr-missing" } ,
{ name = "rpxr.tfm", vector = "tex-mr" } ,
{ name = "rpxmi.tfm", vector = "tex-mi", skewchar=0x7F },
diff --git a/tex/context/fonts/treatments.lfg b/tex/context/fonts/treatments.lfg
index 22706d6e9..b973906c3 100644
--- a/tex/context/fonts/treatments.lfg
+++ b/tex/context/fonts/treatments.lfg
@@ -2,6 +2,47 @@
-- the order specified by tree order access. The first treatment of a file
-- always wins, so one can overload. These files are not (to be) loaded with
-- font definitions. (Experiment as part of writing the font manual.)
+--
+-- So there are several ways to fix a font: add a patcher to a goodie file and
+-- load that one. Such a patch can end up in the cached file. Treatments are
+-- applied at runtime. An experimental auto-loaded goodie approach is not yet
+-- enabled and will never be if treatments can do the job.
+
+local report = fonts.treatments.report
+
+local fix_unifraktur = {
+ comment = "suspicious x height",
+ fixes = function(data)
+ local pfminfo = data.metadata.pfminfo
+ if pfminfo then
+ local os2_xheight = pfminfo.os2_xheight
+ if os2_xheight and os2_xheight < 350 then
+ report("suspicious x-height %a, nilling",os2_xheight)
+ pfminfo.os2_xheight_original = os2_xheight
+ pfminfo.os2_xheight = nil
+ end
+ end
+ end,
+}
+
+local fix_lmmonoregular = {
+ comment = "wrong widths of some glyphs",
+ fixes = function(data)
+ report("fixing some wrong widths")
+ local unicodes = data.resources.unicodes
+ local descriptions = data.descriptions
+ local defaultwidth = descriptions[unicodes["zero"]].width
+ descriptions[unicodes["six"] ].width = defaultwidth
+ descriptions[unicodes["nine"] ].width = defaultwidth
+ descriptions[unicodes["caron"] ].width = defaultwidth
+ descriptions[unicodes["perthousand"] ].width = defaultwidth
+ descriptions[unicodes["numero"] ].width = defaultwidth
+ descriptions[unicodes["caron.cap"] ].width = defaultwidth
+ descriptions[unicodes["six.taboldstyle"] ].width = defaultwidth
+ descriptions[unicodes["nine.taboldstyle"]].width = defaultwidth
+ descriptions[unicodes["dollar.oldstyle" ]].width = defaultwidth
+ end
+}
return {
name = "treatments",
@@ -13,18 +54,26 @@ return {
-- we need to complete this list in order to be able to warn
-- users not to include these files unless permitted
["adobeheitistd-regular.otf"] = {
+ comment = "this font is part of acrobat",
ignored = false,
-- included = false, -- not yet
- comment = "this font is part of acrobat",
},
-- just an experiment .. normally no big deal but I ran into
-- such case
["crap.ttf"] = {
- ignored = true,
comment = "a text file with suffix ttf", -- used in test file
+ ignored = true,
},
- ["latinmodern-math.otf"] = {
- comment = "experimental",
- }
+ -- harmless example
+ -- ["copperplatethirtythreebc.ttf"] = {
+ -- comment = "hangs and has no hyphen",
+ -- ignored = true,
+ -- },
+ -- ["latinmodern-math.otf"] = {
+ -- comment = "experimental",
+ -- },
+ ["lmmono12regular.otf"] = fix_lmmonoregular,
+ ["unifrakturcook.ttf"] = fix_unifraktur,
+ ["unifrakturmaguntia.ttf"] = fix_unifraktur,
},
}
diff --git a/tex/context/fonts/unifraktur.lfg b/tex/context/fonts/unifraktur.lfg
new file mode 100644
index 000000000..32ffed928
--- /dev/null
+++ b/tex/context/fonts/unifraktur.lfg
@@ -0,0 +1,23 @@
+-- moved to treatments.lfg
+--
+-- fonts.handlers.otf.enhancers.patches.register("after","check metadata","unifraktur*", function(data,filename)
+-- data.metadata.pfminfo.os2_xheight = nil
+-- end)
+
+return {
+ name = "unicode fraktur",
+ version = "1.00",
+ comment = "Goodies that complement unicode fraktur.",
+ author = "Hans Hagen",
+ copyright = "ConTeXt development team",
+ letterspacing = {
+ -- watch it: zwnj's are used (in the tounicodes too)
+ keptligatures = {
+ ["c_afii301_k.ccmp"] = true, -- ck
+ ["c_afii301_h.ccmp"] = true, -- ch
+ ["t_afii301_z.ccmp"] = true, -- tz
+ ["uniFB05"] = true, -- ſt
+ },
+ }
+}
+