Skip to content

Commit

Permalink
Merge pull request #357 from SixLabors/js/v2-fix-355
Browse files Browse the repository at this point in the history
Only apply swap for non-horizontal layout
  • Loading branch information
JimBobSquarePants authored Sep 15, 2023
2 parents de9c95c + df4a56f commit a70c2be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/SixLabors.Fonts/TextLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,11 @@ private static void SubstituteBidiMirrors(FontMetrics fontMetrics, GlyphSubstitu

// TODO: This only replaces certain glyphs. We should investigate the specification further.
// https://www.unicode.org/reports/tr50/#vertical_alternates
if (collection.TextOptions.LayoutMode.IsHorizontal())
{
return;
}

for (int i = 0; i < collection.Count; i++)
{
GlyphShapingData data = collection[i];
Expand Down

0 comments on commit a70c2be

Please sign in to comment.