diff options
-rw-r--r-- | src/ios.m | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -768,8 +768,14 @@ int preferredHeight_SystemTextInput(const iSystemTextInput *d) { | |||
768 | } | 768 | } |
769 | 769 | ||
770 | void setFont_SystemTextInput(iSystemTextInput *d, int fontId) { | 770 | void 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 | } |