summaryrefslogtreecommitdiff
path: root/src/ios.m
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-05 22:05:09 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-05 22:05:09 +0200
commit18e92db64278c0db70de8e21fd9db65b783d5975 (patch)
treece0ff8954f0cb380f3c9c943d87013afbf5dc082 /src/ios.m
parente5464259ffe9a6834ee1f4913965089112e9eecb (diff)
iOS: Register Iosevka for the monospace input widget
Diffstat (limited to 'src/ios.m')
-rw-r--r--src/ios.m12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ios.m b/src/ios.m
index 47303b7f..559316a2 100644
--- a/src/ios.m
+++ b/src/ios.m
@@ -811,14 +811,18 @@ int preferredHeight_SystemTextInput(const iSystemTextInput *d) {
811void setFont_SystemTextInput(iSystemTextInput *d, int fontId) { 811void setFont_SystemTextInput(iSystemTextInput *d, int fontId) {
812 float height = lineHeight_Text(fontId) / get_Window()->pixelRatio; 812 float height = lineHeight_Text(fontId) / get_Window()->pixelRatio;
813 UIFont *font; 813 UIFont *font;
814 // for (NSString *name in [UIFont familyNames]) {
815 // printf("family: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]);
816 // }
814 if (fontId / maxVariants_Fonts * maxVariants_Fonts == monospace_FontId) { 817 if (fontId / maxVariants_Fonts * maxVariants_Fonts == monospace_FontId) {
815 font = [UIFont monospacedSystemFontOfSize:0.8f * height weight:UIFontWeightRegular]; 818// font = [UIFont monospacedSystemFontOfSize:0.8f * height weight:UIFontWeightRegular];
819// for (NSString *name in [UIFont fontNamesForFamilyName:@"Iosevka Term"]) {
820// printf("fontname: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]);
821// }
822 font = [UIFont fontWithName:@"Iosevka-Term-Extended" size:height * 0.8f];
816 } 823 }
817 else { 824 else {
818// font = [UIFont systemFontOfSize:0.65f * height]; 825// font = [UIFont systemFontOfSize:0.65f * height];
819// for (NSString *name in [UIFont fontNamesForFamilyName:@"Source Sans 3"]) {
820// printf("fontname: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]);
821// }
822 font = [UIFont fontWithName:@"SourceSans3-Regular" size:height * 0.7f]; 826 font = [UIFont fontWithName:@"SourceSans3-Regular" size:height * 0.7f];
823 } 827 }
824 if (d->field) { 828 if (d->field) {