@@ -253,11 +253,11 @@ public bool TryGetGlyphs(
253253 }
254254
255255 /// <summary>
256- /// Gets the amount, in px units, the <paramref name="current"/> glyph should be offset if it is proceeded by
257- /// the <paramref name="previous "/> glyph.
256+ /// Gets the amount, in px units, the <paramref name="current"/> glyph should be offset if it is followed by
257+ /// the <paramref name="next "/> glyph.
258258 /// </summary>
259- /// <param name="previous">The previous glyph.</param>
260259 /// <param name="current">The current glyph.</param>
260+ /// <param name="next">The next glyph.</param>
261261 /// <param name="dpi">The DPI (Dots Per Inch) to render/measure the kerning offset at.</param>
262262 /// <param name="vector">
263263 /// When this method returns, contains the offset, in font units, that should be applied to the
@@ -267,12 +267,12 @@ public bool TryGetGlyphs(
267267 /// <returns>
268268 /// <see langword="true"/> if the face contains and offset for the glyph combination; otherwise, <see langword="false"/>.
269269 /// </returns>
270- public bool TryGetKerningOffset ( Glyph previous , Glyph current , float dpi , out Vector2 vector )
270+ public bool TryGetKerningOffset ( Glyph current , Glyph next , float dpi , out Vector2 vector )
271271 {
272- if ( this . FontMetrics . TryGetKerningOffset ( previous . GlyphMetrics . GlyphId , current . GlyphMetrics . GlyphId , out vector ) )
272+ if ( this . FontMetrics . TryGetKerningOffset ( current . GlyphMetrics . GlyphId , next . GlyphMetrics . GlyphId , out vector ) )
273273 {
274274 // Scale the result
275- Vector2 scale = new Vector2 ( this . Size * dpi ) / current . GlyphMetrics . ScaleFactor ;
275+ Vector2 scale = new Vector2 ( this . Size * dpi ) / next . GlyphMetrics . ScaleFactor ;
276276 vector *= scale ;
277277 return true ;
278278 }
@@ -290,7 +290,7 @@ private string LoadFontName()
290290 return metrics ;
291291 }
292292
293- if ( this . RequestedStyle . HasFlag ( FontStyle . Italic ) )
293+ if ( ( this . RequestedStyle & FontStyle . Italic ) == FontStyle . Italic )
294294 {
295295 // Can't find style requested and they want one that's at least partial italic.
296296 // Try the regular italic.
@@ -300,7 +300,7 @@ private string LoadFontName()
300300 }
301301 }
302302
303- if ( this . RequestedStyle . HasFlag ( FontStyle . Bold ) )
303+ if ( ( this . RequestedStyle & FontStyle . Bold ) == FontStyle . Bold )
304304 {
305305 // Can't find style requested and they want one that's at least partial bold.
306306 // Try the regular bold.
0 commit comments