A run of Unicode code points now needs one pair of carets, not one pair
each: ^9053 53EF 9053^ renders the characters adjacently, and a single
character inside such a run stands for itself. An invalid code point is
an error naming the position that wrote it, rather than an apology
rendered into the finished document; noncharacters are refused alongside
surrogates; and a code point that lands on a Klammertext special is safe
through the re-reads that assemble a document. The character tables now
produce the precomposed form, so a diacritic written as ^a" and one typed
directly are the same text to a search or a copy-paste.
"kdesc -u" describes how to write a Unicode character, with tables of
glyphs beside the codes that produce them. It is new and not yet
complete: it predates the sequence form and the typeface klammer below.
A typeface and a style are no longer both called "font". A typeface is a
family resolved by name; a style code is the one letter naming a type
style. So @document takes :serif_typeface and its siblings, a table takes
:style, captions take :caption_style and :caption_size, the uniform scale
is :text_scale, and the command is "kdesc --typeface". This renames
arguments a document may already use; an old name is a located error
rather than a silent omission.
@typeface sets a passage in another typeface for the length of that
passage:
@typeface Noto Sans Egyptian Hieroglyphs | ^132AA 133CF^ :scale 1.5 @
Writing the klammer is the whole declaration -- the document resolves the
typeface, embeds it in what it produces, and carries its license along.
Two typefaces for scripts no text font covers now ship with Klammertext:
Noto Sans Egyptian Hieroglyphs and Noto Sans Cuneiform. Every typeface in
the distribution now carries its license file.
(from dev 61e598698891)
42 lines
1.5 KiB
C++
42 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include "font_store.h"
|
|
|
|
namespace latex {
|
|
|
|
// A fontspec declaration: "\<command>[Path=...,Scale=...]{<regular>}".
|
|
// The command is "setmainfont"/"setsansfont"/"setmonofont" for the
|
|
// document's three role typefaces, and "newfontfamily\ktface<n>" for a
|
|
// typeface a @typeface klammer asked for (a switch command rather than a
|
|
// permanent change).
|
|
std::string font_command(const std::string& command, const Resolved_font& font,
|
|
float scale);
|
|
|
|
std::string page(const std::string& structure,
|
|
const std::string& title,
|
|
const std::string& subtitle,
|
|
const std::string& authors,
|
|
const std::string& date,
|
|
const std::string& version,
|
|
const std::string& copyright,
|
|
const std::string& bottom,
|
|
const std::string& prolog,
|
|
const std::string& paper_size,
|
|
bool two_column,
|
|
float leading,
|
|
int pointsize,
|
|
bool ragged_right,
|
|
const std::string& cover,
|
|
bool landscape,
|
|
const std::string& body,
|
|
Resolved_font serif_typeface = {},
|
|
Resolved_font sans_typeface = {},
|
|
Resolved_font mono_typeface = {},
|
|
float text_scale = 1.0f);
|
|
}
|
|
|
|
void check_for_xelatex();
|
|
std::vector<std::string> find_latex_error_lines(const std::string& log_content);
|