1
- // Licensed to the .NET Foundation under one or more agreements.
1
+ // Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
4
//
@@ -81,7 +81,7 @@ private void SetFontSources()
81
81
{
82
82
List < IFontSource > fontSources ;
83
83
if ( _uri . IsFile )
84
- {
84
+ {
85
85
if ( _isFileSystemFolder )
86
86
{
87
87
if ( _tryGetCompositeFontsOnly )
@@ -90,7 +90,7 @@ private void SetFontSources()
90
90
fontSources = new List < IFontSource > ( files . Length ) ;
91
91
92
92
foreach ( string file in files )
93
- fontSources . Add ( new FontSource ( new Uri ( file , UriKind . Absolute ) , _isWindowsFonts , true ) ) ;
93
+ fontSources . Add ( new FontSource ( new Uri ( file , UriKind . Absolute ) , true ) ) ;
94
94
}
95
95
else
96
96
{
@@ -99,15 +99,15 @@ private void SetFontSources()
99
99
foreach ( string file in Util . EnumerateFontsInDirectory ( _uri . LocalPath ) )
100
100
{
101
101
bool isComposite = Util . IsCompositeFont ( file ) ;
102
- fontSources . Add ( new FontSource ( new Uri ( file , UriKind . Absolute ) , _isWindowsFonts , isComposite ) ) ;
102
+ fontSources . Add ( new FontSource ( new Uri ( file , UriKind . Absolute ) , isComposite ) ) ;
103
103
}
104
104
}
105
105
}
106
106
else
107
107
{
108
108
fontSources = new List < IFontSource > ( 1 ) ;
109
109
if ( Util . IsSupportedFontExtension ( Path . GetExtension ( _uri . LocalPath . AsSpan ( ) ) , out bool isComposite ) )
110
- fontSources . Add ( new FontSource ( new Uri ( _uri . LocalPath , UriKind . Absolute ) , _isWindowsFonts , isComposite ) ) ;
110
+ fontSources . Add ( new FontSource ( new Uri ( _uri . LocalPath , UriKind . Absolute ) , isComposite ) ) ;
111
111
}
112
112
}
113
113
else
@@ -145,7 +145,7 @@ private void SetFontSources()
145
145
}
146
146
}
147
147
148
-
148
+
149
149
#region IEnumerable<FontSource> Members
150
150
151
151
IEnumerator < IFontSource > IEnumerable < IFontSource > . GetEnumerator ( )
@@ -164,8 +164,7 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
164
164
return _fontSources . GetEnumerator ( ) ;
165
165
}
166
166
167
- #endregion
168
-
167
+ #endregion
169
168
170
169
private Uri _uri ;
171
170
0 commit comments