# HG changeset patch # User glx # Date 2020-02-15 02:08:29 # Node ID 2dabe397dfc5913d7552291cf596692574bfb1ae # Parent 4ef53c5b9862d25f2eadc39ae0dd2a76f3c5f2eb Fix: Ignore not printable characters when layouting a string diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp --- a/src/gfx_layout.cpp +++ b/src/gfx_layout.cpp @@ -631,6 +631,8 @@ static inline void GetLayouter(Layouter: } else if (c >= SCC_FIRST_FONT && c <= SCC_LAST_FONT) { state.SetFontSize((FontSize)(c - SCC_FIRST_FONT)); } else { + /* Filter out non printable characters */ + if (!IsPrintable(c)) continue; /* Filter out text direction characters that shouldn't be drawn, and * will not be handled in the fallback non ICU case because they are * mostly needed for RTL languages which need more ICU support. */