File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Source/OxyPlot.Maui.Skia/Platforms Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ public Stream Load(string fontName)
1212 if ( fontRegistrar == null )
1313 fontRegistrar = IPlatformApplication . Current . Services . GetRequiredService < IFontRegistrar > ( ) ;
1414
15- fontName = fontRegistrar . GetFont ( fontName ) ;
16- if ( File . Exists ( fontName ) )
17- {
15+ fontName = fontRegistrar . GetFont ( fontName ) ?? fontName ;
16+ if ( fontName == null )
17+ return null ;
18+ else if ( File . Exists ( fontName ) )
1819 return File . OpenRead ( fontName ) ;
19- }
2020
2121 try
2222 {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public Stream Load(string fontName)
1212 if ( fontRegistrar == null )
1313 fontRegistrar = IPlatformApplication . Current . Services . GetRequiredService < IFontRegistrar > ( ) ;
1414
15- fontName = fontRegistrar . GetFont ( fontName ) ;
15+ fontName = fontRegistrar . GetFont ( fontName ) ?? fontName ;
1616 if ( fontName == null )
1717 return null ;
1818 else if ( File . Exists ( fontName ) )
You can’t perform that action at this time.
0 commit comments