48 CTFontCreateUIFontForLanguage(kCTFontUIFontSystem,
size,
nullptr));
55 kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks,
56 &kCFTypeDictionaryValueCallBacks));
58 auto add_axis_to_variations = [&variations](
const FourCharCode tag,
61 if (desired_value != normal_value) {
63 CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &tag));
65 kCFAllocatorDefault, kCFNumberFloatType, &desired_value));
66 CFDictionarySetValue(variations, tag_number, value_number);
72 kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks,
73 &kCFTypeDictionaryValueCallBacks));
74 CFDictionarySetValue(attributes, kCTFontVariationAttribute, variations);
77 CTFontDescriptorCreateWithAttributes(attributes));
80 CTFontCreateCopyWithAttributes(ct_font,
size,
nullptr, var_font_desc));
100 auto register_weighted_font = [&dynamic_font_manager](
const int weight) {
103 if (large_system_font_weighted) {
108 for (
int i = 0; i < 8; i++) {
109 const int font_weight = i * 100;
110 register_weighted_font(font_weight);
113 register_weighted_font(780);
115 register_weighted_font(810);