summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ios.m10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ios.m b/src/ios.m
index 02659c55..290d4804 100644
--- a/src/ios.m
+++ b/src/ios.m
@@ -768,8 +768,14 @@ int preferredHeight_SystemTextInput(const iSystemTextInput *d) {
768} 768}
769 769
770void setFont_SystemTextInput(iSystemTextInput *d, int fontId) { 770void setFont_SystemTextInput(iSystemTextInput *d, int fontId) {
771 int height = lineHeight_Text(fontId); 771 float height = lineHeight_Text(fontId) / get_Window()->pixelRatio;
772 UIFont *font = [UIFont systemFontOfSize:0.65f * height / get_Window()->pixelRatio]; 772 UIFont *font;
773 if (fontId / maxVariants_Fonts * maxVariants_Fonts == monospace_FontId) {
774 font = [UIFont monospacedSystemFontOfSize:0.8f * height weight:UIFontWeightRegular];
775 }
776 else {
777 font = [UIFont systemFontOfSize:0.65f * height];
778 }
773 if (d->field) { 779 if (d->field) {
774 [REF_d_field setFont:font]; 780 [REF_d_field setFont:font];
775 } 781 }