summaryrefslogtreecommitdiff
path: root/tex/context/fonts
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-07 11:00:21 +0300
committerMarius <mariausol@gmail.com>2013-10-07 11:00:21 +0300
commit498eb3a0485c5510695edfd678d587f07afe19c8 (patch)
tree08120f06780fd9f88084f406036d2813b9d4edb6 /tex/context/fonts
parent3b2e97139b40df9c0308de41fb619cfad7dc6f18 (diff)
downloadcontext-498eb3a0485c5510695edfd678d587f07afe19c8.tar.gz
beta 2013.10.07 09:47
Diffstat (limited to 'tex/context/fonts')
-rw-r--r--tex/context/fonts/treatments.lfg28
-rw-r--r--tex/context/fonts/unifraktur.lfg6
2 files changed, 31 insertions, 3 deletions
diff --git a/tex/context/fonts/treatments.lfg b/tex/context/fonts/treatments.lfg
index 22706d6e9..54f35d535 100644
--- a/tex/context/fonts/treatments.lfg
+++ b/tex/context/fonts/treatments.lfg
@@ -2,6 +2,26 @@
-- 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 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
+ fonts.treatments.report("suspicious x-height %a, nilling",os2_xheight)
+ pfminfo.os2_xheight_original = os2_xheight
+ pfminfo.os2_xheight = nil
+ end
+ end
+ end,
+}
return {
name = "treatments",
@@ -13,18 +33,20 @@ 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",
- }
+ },
+ ["unifrakturcook.ttf"] = unifraktur,
+ ["unifrakturmaguntia.ttf"] = unifraktur,
},
}
diff --git a/tex/context/fonts/unifraktur.lfg b/tex/context/fonts/unifraktur.lfg
index 8b9b299f5..32ffed928 100644
--- a/tex/context/fonts/unifraktur.lfg
+++ b/tex/context/fonts/unifraktur.lfg
@@ -1,3 +1,9 @@
+-- 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",