The ansi target, txt table styles, kdesc reference from ref/, typeface and table-width fixes (from dev fcec5e2e77ac)
Since the previous release: Machine::read_string() (the fs::path/std::string overload pair split); kdesc -c and -u rendered from the ref/ reflection klammerset; a fit column's tex width measured in TeX over every entry; @typeface resolving to the family its css declares (a store directory name now works in html) and hieroglyphs in @unicode_examples set in their typeface; the ansi target -- plain text with the type styles a terminal can show, identical to txt once the escape sequences are stripped -- with the txt @table carrying :header_style, :style and :hline; @block anchoring, @table spacing and the Image_quality state variable; and the rewritten doc/klammertext_for_llm.md.
This commit is contained in:
1 parent
760fda5470
commit
9b0d0d7897
34 files changed
+895
-394
No files matched your search
@@ -89,6 +89,15 @@ static void classify_from_css(Resolved_font& font, std::string css_path)
|
||||
{
|
||||
// Parse the @font-face blocks in the CSS to determine variant → filename mapping
|
||||
std::string css = string_from_file(css_path);
|
||||
// The family name is what the css DECLARES, not what the caller wrote:
|
||||
// a typeface may be asked for by its directory name
|
||||
// ("noto-sans-egyptian-hieroglyphs"), and a font-family value in
|
||||
// generated html must match the @font-face or the browser substitutes
|
||||
// silently (until 2026-09-12 the request was echoed back).
|
||||
static const std::regex family_rgx(R"(font-family:\s*'([^']+)')");
|
||||
std::smatch match;
|
||||
if (std::regex_search(css, match, family_rgx))
|
||||
font.family_name = match[1];
|
||||
std::regex face_rgx(
|
||||
R"(@font-face\s*\{[^}]*font-style:\s*(\w+);[^}]*font-weight:\s*(\w+);[^}]*url\('([^']+\.ttf)'\)[^}]*\})",
|
||||
std::regex::multiline);
|
||||
|
||||
Reference in new issue
Block a user