txt section numbering, @typeface :middle/:lift and html scale, NewGardinerOmni, html :leading (from dev 9fa469dd74ed)
Section headings under txt are numbered inside a @document only; @typeface gains :middle and :lift and its :scale now means the same in html and pdf; NewGardinerOmni ships (OFL 1.1, Mark-Jan Nederhof) and @egyptian / @chinese replace @cjk; @table :leading and :colsep reach html; kdesc --typeface help names the flag; @document.txt is a Python class. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
0ead40f272
commit
63956c00e5
26 files changed
+437
-173
No files matched your search
+29
-4
@@ -26,13 +26,28 @@ font as document text instead of setting anything. @typeface is the
|
||||
temporary, all-target replacement.
|
||||
]#
|
||||
|
||||
@@typeface.k name | text :scale.float 1.0 :
|
||||
@@typeface.k name | text :scale.float 1.0 :middle.bool :lift.length :
|
||||
A temporary change of typeface for *text*: the typeface *name* is
|
||||
resolved in the Klammertext font store (the directories of
|
||||
KLAMMERTEXT_FONTS, then the distribution's own), and the document
|
||||
declares and localizes it automatically -- writing this klammer is the
|
||||
only declaration needed. *scale* multiplies the surrounding text size,
|
||||
which a script whose glyphs are drawn small usually wants.
|
||||
only declaration needed. *scale* multiplies the size of the surrounding
|
||||
text as it appears, the same in html and pdf, which a script whose glyphs
|
||||
are drawn small usually wants.
|
||||
|
||||
*middle* centres *text* on the surrounding line instead of standing it on
|
||||
the baseline -- for a script with no baseline relationship to the text,
|
||||
such as hieroglyphs, whose font declares a tall ascender that would
|
||||
otherwise open up every line the glyphs sit in. Html only: in tex a
|
||||
row is already as tight as its tallest glyph. Never for a Latin
|
||||
typeface, whose baseline must stay shared with the text around it.
|
||||
|
||||
*lift* shifts *text* up by a length (down when negative), in em, pt or
|
||||
px -- the correction for a font that draws its glyphs off the baseline,
|
||||
which is a property of the font and so belongs in the klammer that names
|
||||
it: Noto Sans Egyptian Hieroglyphs floats its signs and wants about
|
||||
0.15em, NewGardinerOmni stands them on the baseline and wants none.
|
||||
Html and tex alike; the txt target has no vertical position.
|
||||
|
||||
The change ends with *text*: nothing after it is affected. Under the
|
||||
txt target a typeface cannot be expressed at all, so *text* is emitted
|
||||
@@ -107,9 +122,19 @@ than a typeface -- xeCJK for the tex path), so this klammer errors with
|
||||
the list of available typefaces until one is installed with
|
||||
"kdesc --typeface install". That is the honest behaviour: the klammer
|
||||
states what it needs and the store reports what it has.
|
||||
]#
|
||||
@@cjk.k text : Set *text* in a typeface that supports CJK @@
|
||||
@@cjk.html,tex,txt :: @typeface Noto Sans CJK SC | *text* @ @@
|
||||
]#
|
||||
|
||||
# Only defining on Chinese style for now; could be parameterized.
|
||||
@@chinese.k text :scale.float 1 : Set *text* in a Chinese font @@
|
||||
@@chinese.html,tex,txt :: @typeface Noto Serif SC :scale *scale* | *text* @ @@
|
||||
|
||||
# Egyptian hieroglyphs
|
||||
@@egyptian.k text :scale.float 1.75 : Set *text* in an Egyptian hieroglyph font @@
|
||||
@@egyptian.html,tex,txt :: @typeface NewGardinerOmni :scale *scale* :middle | *text* @ @@
|
||||
# @@egyptian.html,tex,txt :: @typeface Noto Sans Egyptian Hieroglyphs :scale *scale* :middle | *text* @ @@
|
||||
|
||||
|
||||
@@fraktur.k s : Set text *s* in Fraktur @@
|
||||
@@fraktur.tex :: \textfrak{*s*} @@
|
||||
|
||||
Reference in new issue
Block a user