diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-05-29 21:10:47 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-05-29 21:10:47 +0200 |
commit | e2658addf306f729945c184e46f98df39dd7026c (patch) | |
tree | 0d4b3ec934773cc4e33fa88eda5a8041be2ec36b /doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua | |
parent | 8b678f473da7b81842dbc13b50c6303991570521 (diff) | |
download | context-e2658addf306f729945c184e46f98df39dd7026c.tar.gz |
2019-05-29 19:20:00
Diffstat (limited to 'doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua')
-rw-r--r-- | doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua b/doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua deleted file mode 100644 index 667d1e43c..000000000 --- a/doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua +++ /dev/null @@ -1,47 +0,0 @@ -local startactualtext = backends.codeinjections.startunicodetoactualtext -local stopactualtext = backends.codeinjections.stopunicodetoactualtext - -return function(specification) - local features = specification.features.normal - local name = features.original or "dejavu-serif" - local option = features.option -- we only support "line" - local size = specification.size -- always set - local detail = specification.detail -- e.g. default - if detail then - name = name .. "*" .. detail - end - local f, id = fonts.constructors.readanddefine(name,size) - if f then - f.properties.name = specification.name - f.properties.virtualized = true - f.fonts = { - { id = id }, - } - for s in string.gmatch("aeuioy",".") do - local n = utf.byte(s) - local c = f.characters[n] - if c then - local w = c.width or 0 - local h = c.height or 0 - local d = c.depth or 0 - if option == "line" then - f.characters[n].commands = { - { "special", "pdf:direct:" .. startactualtext(n) }, - { "rule", option == "line" and size/10, w }, - { "special", "pdf:direct:" .. stopactualtext() }, - } - else - f.characters[n].commands = { - { "special", "pdf:direct:" .. startactualtext(n) }, - { "down", d }, - { "rule", h + d, w }, - { "special", "pdf:direct:" .. stopactualtext() }, - } - end - else - -- probably a real bad font - end - end - end - return f -end |