File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,8 @@ export const findFont = (style: TextStyle): NSFont => {
100100 let fontWeight = style . fontWeight
101101 ? FONT_WEIGHTS [ style . fontWeight . toLowerCase ( ) ]
102102 : defaultFontWeight ;
103- // Default to Helvetica if fonts are missing
104- // Must use two equals (==) for compatibility with Cocoascript
105- // eslint-disable-next-line eqeqeq
106- let familyName = defaultFontFamily == APPLE_BROKEN_SYSTEM_FONT ? 'Helvetica' : defaultFontFamily ;
103+
104+ let familyName = defaultFontFamily ;
107105 let isItalic = false ;
108106 let isCondensed = false ;
109107
@@ -156,7 +154,6 @@ export const findFont = (style: TextStyle): NSFont => {
156154 isItalic = style . fontStyle ? isItalic : isItalicFont ( font ) ;
157155 isCondensed = isCondensedFont ( font ) ;
158156 } else {
159- console . log ( `Unrecognized font family '${ familyName } '` ) ;
160157 font = NSFont . systemFontOfSize_weight ( fontSize , fontWeight ) ;
161158 }
162159
@@ -198,7 +195,7 @@ export const findFont = (style: TextStyle): NSFont => {
198195 return font ;
199196} ;
200197
201- export default function findFontName ( style : TextStyle ) {
198+ export default function findFontName ( style : TextStyle ) : string {
202199 const font = findFont ( style ) ;
203200 return font . fontDescriptor ( ) . postscriptName ( ) ;
204201}
You can’t perform that action at this time.
0 commit comments