summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/fonts/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'doc/context/sources/general/fonts/fonts')
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua47
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-extensions.tex13
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-features.tex2
-rw-r--r--doc/context/sources/general/fonts/fonts/fonts-tricks.tex2
4 files changed, 59 insertions, 5 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
new file mode 100644
index 000000000..667d1e43c
--- /dev/null
+++ b/doc/context/sources/general/fonts/fonts/fonts-demo-rule.lua
@@ -0,0 +1,47 @@
+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
diff --git a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex
index ace0f771e..afe6fd823 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex
@@ -718,6 +718,8 @@ the comma also pulls the preceding character into the margin.
\getbuffer [example]
\stopplacefigure
+\stopsubsubject
+
\stopsection
\startsection[title=Expansion]
@@ -822,6 +824,8 @@ You can see what happens in \in {figure} [expansion:visualized].
\getbuffer [example]
\stopplacefigure
+\stopsubsubject
+
\startsubsubject[title=Expansion and kerning]
When we expand glyphs we also need to look at the font kerns between them. In the
@@ -1763,7 +1767,6 @@ only when we touch a space:
},
},
}
-
\stopluacode
\stopbuffer
@@ -2220,9 +2223,11 @@ fonts.handlers.otf.addfeature {
{
type = "pair",
data = {
- [<char|code>] = { [<char|code>] = {
- false | { <value>, <value>, <value>, <value> },
- false | { <value>, <value>, <value>, <value> }
+ [<char|code>] = {
+ [<char|code>] = {
+ false | { <value>, <value>, <value>, <value> },
+ false | { <value>, <value>, <value>, <value> }
+ }
}
}
},
diff --git a/doc/context/sources/general/fonts/fonts/fonts-features.tex b/doc/context/sources/general/fonts/fonts/fonts-features.tex
index 73d1cd96d..bf9f39385 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-features.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-features.tex
@@ -2667,7 +2667,7 @@ We can enable and disable features any time in the input by using the
\startbuffer
\definefont
[WeirdShapes]
- [file:linlibertiner*default]
+ [file:libertiner*default]
\definefontfeature
[hist]
diff --git a/doc/context/sources/general/fonts/fonts/fonts-tricks.tex b/doc/context/sources/general/fonts/fonts/fonts-tricks.tex
index b8903b5ed..65b210e2c 100644
--- a/doc/context/sources/general/fonts/fonts/fonts-tricks.tex
+++ b/doc/context/sources/general/fonts/fonts/fonts-tricks.tex
@@ -386,3 +386,5 @@ and in the distribution.
\stopsection
\stopchapter
+
+\stopcomponent