kdesc --typeface from the reflection klammerset; a missing font directory is a row, not an error
Assembled from klammertext-dev daad6273483a. The font-store listing is rendered from ref/ (one table per search directory, in search order, with the styles each typeface holds); the search path is described, not validated, so a KLAMMERTEXT_FONTS directory that does not exist -- the default ~/.klammertext/fonts on a fresh install -- is a row saying so and the command exits 0. A typeface an earlier directory also holds is marked shadowed, with the winning directory, in a column present only when needed. The store's layout convention has one reader, fonts_in_directory(). Six kdesc suite cases pin the listing.
This commit is contained in:
1 parent
c016b3e5f3
commit
f9af1ff869
7 files changed
+188
-103
No files matched your search
+7
-3
@@ -28,6 +28,13 @@ std::vector<std::string> installed_font_dirs();
|
||||
std::string default_font_dir();
|
||||
// Every installable font family found across those directories.
|
||||
std::vector<std::string> available_font_families();
|
||||
// Every font ONE base directory holds, in directory-name order: each
|
||||
// <name>.css beside a <name>/ directory, the family name read from the css
|
||||
// (the directory name when the css declares none), the styles classified.
|
||||
// Empty for a directory that does not exist or holds no fonts; the caller
|
||||
// asks the filesystem which. The store's layout convention lives here, so
|
||||
// a listing of the store (kdesc --typeface) reads it rather than restating it.
|
||||
std::vector<Resolved_font> fonts_in_directory(const std::string& base);
|
||||
// Whether the store can resolve NAME -- written as the family name or as
|
||||
// the store's directory name, since both resolve. The question a klammer
|
||||
// asks before it names a typeface that is not shipped (a CJK face), so it
|
||||
@@ -61,9 +68,6 @@ std::vector<Font_file> classify_font_files(const std::string& directory);
|
||||
// generated <family-kebab>.css with relative urls. Returns a report.
|
||||
std::string install_fonts(const std::string& source_dir, std::string dest_dir = "");
|
||||
|
||||
// Describe every font in the store with provenance and variants.
|
||||
std::string describe_fonts();
|
||||
|
||||
// Write an HTML specimen page for fonts into output_dir. With an empty
|
||||
// source_dir, samples every available font in the store; otherwise
|
||||
// classifies and samples the (possibly uninstalled) fonts in source_dir.
|
||||
|
||||
Reference in new issue
Block a user