@@ -1154,12 +1154,12 @@ opacityProperty.register(Style);
11541154export const colorProperty = new InheritedCssProperty < Style , Color > ( { name : "color" , cssName : "color" , equalityComparer : Color . equals , valueConverter : ( v ) => new Color ( v ) } ) ;
11551155colorProperty . register ( Style ) ;
11561156
1157- export const fontInternalProperty = new CssProperty < Style , Font > ( { name : "fontInternal" , cssName : "_fontInternal" , defaultValue : Font . default } ) ;
1157+ export const fontInternalProperty = new CssProperty < Style , Font > ( { name : "fontInternal" , cssName : "_fontInternal" } ) ;
11581158fontInternalProperty . register ( Style ) ;
11591159
11601160export const fontFamilyProperty = new InheritedCssProperty < Style , string > ( {
11611161 name : "fontFamily" , cssName : "font-family" , affectsLayout : isIOS , valueChanged : ( target , oldValue , newValue ) => {
1162- let currentFont = target . fontInternal ;
1162+ let currentFont = target . fontInternal || Font . default ;
11631163 if ( currentFont . fontFamily !== newValue ) {
11641164 const newFont = currentFont . withFontFamily ( newValue ) ;
11651165 target . fontInternal = Font . equals ( Font . default , newFont ) ? unsetValue : newFont ;
@@ -1170,7 +1170,10 @@ fontFamilyProperty.register(Style);
11701170
11711171export const fontSizeProperty = new InheritedCssProperty < Style , number > ( {
11721172 name : "fontSize" , cssName : "font-size" , affectsLayout : isIOS , valueChanged : ( target , oldValue , newValue ) => {
1173- let currentFont = target . fontInternal ;
1173+ if ( target . viewRef [ "handleFontSize" ] === true ) {
1174+ return ;
1175+ }
1176+ let currentFont = target . fontInternal || Font . default ;
11741177 if ( currentFont . fontSize !== newValue ) {
11751178 const newFont = currentFont . withFontSize ( newValue ) ;
11761179 target . fontInternal = Font . equals ( Font . default , newFont ) ? unsetValue : newFont ;
@@ -1182,7 +1185,7 @@ fontSizeProperty.register(Style);
11821185
11831186export const fontStyleProperty = new InheritedCssProperty < Style , FontStyle > ( {
11841187 name : "fontStyle" , cssName : "font-style" , affectsLayout : isIOS , defaultValue : FontStyle . NORMAL , valueConverter : FontStyle . parse , valueChanged : ( target , oldValue , newValue ) => {
1185- let currentFont = target . fontInternal ;
1188+ let currentFont = target . fontInternal || Font . default ;
11861189 if ( currentFont . fontStyle !== newValue ) {
11871190 const newFont = currentFont . withFontStyle ( newValue ) ;
11881191 target . fontInternal = Font . equals ( Font . default , newFont ) ? unsetValue : newFont ;
@@ -1193,7 +1196,7 @@ fontStyleProperty.register(Style);
11931196
11941197export const fontWeightProperty = new InheritedCssProperty < Style , FontWeight > ( {
11951198 name : "fontWeight" , cssName : "font-weight" , affectsLayout : isIOS , defaultValue : FontWeight . NORMAL , valueConverter : FontWeight . parse , valueChanged : ( target , oldValue , newValue ) => {
1196- let currentFont = target . fontInternal ;
1199+ let currentFont = target . fontInternal || Font . default ;
11971200 if ( currentFont . fontWeight !== newValue ) {
11981201 const newFont = currentFont . withFontWeight ( newValue ) ;
11991202 target . fontInternal = Font . equals ( Font . default , newFont ) ? unsetValue : newFont ;
0 commit comments