Initial commit: Klammertext source distribution
Curated source subset assembled by klammertext-dev's doc/make_dist.sh: the Klammermachine (mac), the Standard Klammer Set (sks), the commands (com), editor plugins and install guides (doc), a test subset (tst), and lib/bin placeholders. Builds with 'make -C com'. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
24
sks/target/font_resolve.h
Normal file
24
sks/target/font_resolve.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct Resolved_font {
|
||||
std::string family_name {}; // "Crimson Pro"
|
||||
std::string dir_name {}; // "crimson-pro"
|
||||
std::string font_dir {}; // Full path to font directory
|
||||
std::string css_file {}; // Full path to .css file
|
||||
bool from_cache = false;
|
||||
// .ttf filenames for each variant (empty if variant not available):
|
||||
std::string regular {};
|
||||
std::string bold {};
|
||||
std::string italic {};
|
||||
std::string bold_italic {};
|
||||
float xheight_ratio = 0.0f; // x-height / unitsPerEm from OS/2 table
|
||||
float capheight_ratio = 0.0f; // cap-height / unitsPerEm from OS/2 table
|
||||
};
|
||||
|
||||
std::string name_to_dirname(std::string name);
|
||||
std::string name_to_google_query(std::string name);
|
||||
Resolved_font resolve_font(std::string family_name);
|
||||
void install_resolved_font(const Resolved_font& font, std::string output_dir);
|
||||
Reference in New Issue
Block a user