Skip to content

Commit a70c2be

Browse files
Merge pull request #357 from SixLabors/js/v2-fix-355
Only apply swap for non-horizontal layout
2 parents de9c95c + df4a56f commit a70c2be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/SixLabors.Fonts/TextLayout.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,11 @@ private static void SubstituteBidiMirrors(FontMetrics fontMetrics, GlyphSubstitu
825825

826826
// TODO: This only replaces certain glyphs. We should investigate the specification further.
827827
// https://www.unicode.org/reports/tr50/#vertical_alternates
828+
if (collection.TextOptions.LayoutMode.IsHorizontal())
829+
{
830+
return;
831+
}
832+
828833
for (int i = 0; i < collection.Count; i++)
829834
{
830835
GlyphShapingData data = collection[i];

0 commit comments

Comments
 (0)