File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -323,10 +323,7 @@ -(void) create:(JsonObject*)json
323323 returnKeyType = UIReturnKeyDone;
324324 }
325325
326- CGRect screenRect = [[UIScreen mainScreen ] bounds ];
327- CGFloat screenWidth = screenRect.size .width ;
328- CGFloat logicalScreenWidth = screenWidth / viewPlugin.contentScaleFactor ;
329- fontSize = (logicalScreenWidth / 1024 .0f ) * fontSize;
326+ fontSize = fontSize / viewPlugin.contentScaleFactor ;
330327
331328 UIFont* uiFont;
332329 if ([font length ] > 0 )
Original file line number Diff line number Diff line change @@ -209,15 +209,9 @@ private void PrepareNativeEdit()
209209 if ( useInputFieldFont )
210210 mConfig . font = objUnityText . font . fontNames . Length > 0 ? objUnityText . font . fontNames [ 0 ] : "Arial" ;
211211
212-
213- // Font size scaling for iOS is done on the native side.
214- #if UNITY_IOS
215- mConfig . fontSize = ( ( float ) objUnityText . fontSize ) ;
216- #else
217212 Rect rectScreen = GetScreenRectFromRectTransform ( this . objUnityText . rectTransform ) ;
218213 float fHeightRatio = rectScreen . height / objUnityText . rectTransform . rect . height ;
219214 mConfig . fontSize = ( ( float ) objUnityText . fontSize ) * fHeightRatio ;
220- #endif
221215
222216 mConfig . textColor = objUnityText . color ;
223217 mConfig . align = objUnityText . alignment . ToString ( ) ;
You can’t perform that action at this time.
0 commit comments