From 18e92db64278c0db70de8e21fd9db65b783d5975 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 5 Dec 2021 22:05:09 +0200 Subject: iOS: Register Iosevka for the monospace input widget --- src/ios.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ios.m') 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) { void setFont_SystemTextInput(iSystemTextInput *d, int fontId) { float height = lineHeight_Text(fontId) / get_Window()->pixelRatio; UIFont *font; + // for (NSString *name in [UIFont familyNames]) { + // printf("family: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]); + // } if (fontId / maxVariants_Fonts * maxVariants_Fonts == monospace_FontId) { - font = [UIFont monospacedSystemFontOfSize:0.8f * height weight:UIFontWeightRegular]; +// font = [UIFont monospacedSystemFontOfSize:0.8f * height weight:UIFontWeightRegular]; +// for (NSString *name in [UIFont fontNamesForFamilyName:@"Iosevka Term"]) { +// printf("fontname: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]); +// } + font = [UIFont fontWithName:@"Iosevka-Term-Extended" size:height * 0.8f]; } else { // font = [UIFont systemFontOfSize:0.65f * height]; -// for (NSString *name in [UIFont fontNamesForFamilyName:@"Source Sans 3"]) { -// printf("fontname: %s\n", [name cStringUsingEncoding:NSUTF8StringEncoding]); -// } font = [UIFont fontWithName:@"SourceSans3-Regular" size:height * 0.7f]; } if (d->field) { -- cgit v1.2.3