core: hook up the codepoint map to the loaded font group

This commit is contained in:
Mitchell Hashimoto
2023-09-24 20:35:05 -07:00
parent a8877d334c
commit c2cc2b8f03
2 changed files with 8 additions and 0 deletions

View File

@ -224,6 +224,11 @@ pub fn init(
var group = try font.Group.init(alloc, font_lib, font_size);
errdefer group.deinit();
// If we have codepoint mappings, set those.
if (config.@"font-codepoint-map".map.list.len > 0) {
group.codepoint_map = config.@"font-codepoint-map".map;
}
// Search for fonts
if (font.Discover != void) discover: {
const disco = try app.fontDiscover() orelse {

View File

@ -104,6 +104,9 @@ const c = @cImport({
///
/// This configuration can be repeated multiple times to specify multiple
/// codepoint mappings.
///
/// Changing this configuration at runtime will only affect new terminals,
/// i.e. new windows, tabs, etc.
@"font-codepoint-map": RepeatableCodepointMap = .{},
/// Draw fonts with a thicker stroke, if supported. This is only supported