File tree 2 files changed +5
-14
lines changed
packages/core/image-source 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -187,14 +187,12 @@ export class ImageSource implements ImageSourceDefinition {
187
187
paint . setColor ( color . android ) ;
188
188
}
189
189
190
- let fontSize = layout . toDevicePixels ( font . fontSize ) ;
191
- if ( ! fontSize ) {
190
+ let scaledFontSize = layout . toDevicePixels ( font . fontSize ) ;
191
+ if ( ! scaledFontSize ) {
192
192
// TODO: Consider making 36 font size as default for optimal look on TabView and ActionBar
193
- fontSize = paint . getTextSize ( ) ;
193
+ scaledFontSize = layout . toDevicePixels ( paint . getTextSize ( ) ) ;
194
194
}
195
195
196
- const density = layout . getDisplayDensity ( ) ;
197
- const scaledFontSize = fontSize * density ;
198
196
paint . setTextSize ( scaledFontSize ) ;
199
197
200
198
const textBounds = new android . graphics . Rect ( ) ;
Original file line number Diff line number Diff line change @@ -180,17 +180,10 @@ export class ImageSource implements ImageSourceDefinition {
180
180
181
181
static fromFontIconCodeSync ( source : string , font : Font , color : Color ) : ImageSource {
182
182
font = font || Font . default ;
183
- let fontSize = layout . toDevicePixels ( font . fontSize ) ;
184
- if ( ! fontSize ) {
185
- // TODO: Consider making 36 font size as default for optimal look on TabView and ActionBar
186
- fontSize = UIFont . labelFontSize ;
187
- }
188
-
189
- const density = layout . getDisplayDensity ( ) ;
190
- const scaledFontSize = fontSize * density ;
191
183
184
+ // TODO: Consider making 36 font size as default for optimal look on TabView and ActionBar
192
185
const attributes = {
193
- [ NSFontAttributeName ] : font . getUIFont ( UIFont . systemFontOfSize ( scaledFontSize ) ) ,
186
+ [ NSFontAttributeName ] : font . getUIFont ( UIFont . systemFontOfSize ( UIFont . labelFontSize ) ) ,
194
187
} ;
195
188
196
189
if ( color ) {
You can’t perform that action at this time.
0 commit comments