From 174be47332b5bfbf845bfa92fda995d1b23a98ba Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Sat, 23 Feb 2002 22:37:16 +0000 Subject: Patch from Sven Neumann to extend and make consistent the set of Sat Feb 23 17:34:26 2002 Owen Taylor * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann to extend and make consistent the set of zero-width characters that are not displayed. (#71931) --- ChangeLog | 6 ++++++ ChangeLog.pre-1-0 | 6 ++++++ ChangeLog.pre-1-10 | 6 ++++++ ChangeLog.pre-1-2 | 6 ++++++ ChangeLog.pre-1-4 | 6 ++++++ ChangeLog.pre-1-6 | 6 ++++++ ChangeLog.pre-1-8 | 6 ++++++ modules/basic/basic-fc.c | 21 ++++++++++++++++++++- modules/basic/basic-ft2.c | 21 ++++++++++++++++++++- modules/basic/basic-x.c | 21 ++++++++++++++++++++- modules/basic/basic-xft.c | 21 ++++++++++++++++++++- 11 files changed, 122 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9d257963..e60b678f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-0 +++ b/ChangeLog.pre-1-0 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-10 +++ b/ChangeLog.pre-1-10 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-2 +++ b/ChangeLog.pre-1-2 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-4 +++ b/ChangeLog.pre-1-4 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-6 +++ b/ChangeLog.pre-1-6 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8 index 9d257963..e60b678f 100644 --- a/ChangeLog.pre-1-8 +++ b/ChangeLog.pre-1-8 @@ -1,3 +1,9 @@ +Sat Feb 23 17:34:26 2002 Owen Taylor + + * modules/basic/basic-{ft2,x,xft}.c: Patch from Sven Neumann + to extend and make consistent the set of zero-width characters + that are not displayed. (#71931) + Sat Feb 23 13:07:02 2002 Owen Taylor * pango/pango-font.h pango/pango-fontmap.h pango/pango-fontset.h: diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index 6552a347..0d2ea653 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -26,6 +26,25 @@ #include "pango-engine.h" #include "pango-utils.h" + +/* Zero Width characters: + * + * 200B ZERO WIDTH SPACE + * 200C ZERO WIDTH NON-JOINER + * 200D ZERO WIDTH JOINER + * 200E LEFT-TO-RIGHT MARK + * 200F RIGHT-TO-LEFT MARK + * 202A LEFT-TO-RIGHT EMBEDDING + * 202B RIGHT-TO-LEFT EMBEDDING + * 202C POP DIRECTIONAL FORMATTING + * 202D LEFT-TO-RIGHT OVERRIDE + * 202E RIGHT-TO-LEFT OVERRIDE + */ + +#define ZERO_WIDTH_CHAR(wc)\ +(((wc) >= 0x200B && (wc) <= 0x200F) || ((wc) >= 0x202A && (wc) <= 0x202E)) + + static PangoEngineRange basic_ranges[] = { /* Language characters */ { 0x0380, 0x058f, "*" }, @@ -142,7 +161,7 @@ basic_engine_shape (PangoFont *font, input = buf; } - if (wc >= 0x200B && wc <= 0x200F) /* Zero-width characters */ + if (ZERO_WIDTH_CHAR (wc)) { set_glyph (font, glyphs, i, p - text, 0); } diff --git a/modules/basic/basic-ft2.c b/modules/basic/basic-ft2.c index e16a5e29..ffff113f 100644 --- a/modules/basic/basic-ft2.c +++ b/modules/basic/basic-ft2.c @@ -29,6 +29,25 @@ #define SCRIPT_ENGINE_NAME "BasicScriptEngineFT2" + +/* Zero Width characters: + * + * 200B ZERO WIDTH SPACE + * 200C ZERO WIDTH NON-JOINER + * 200D ZERO WIDTH JOINER + * 200E LEFT-TO-RIGHT MARK + * 200F RIGHT-TO-LEFT MARK + * 202A LEFT-TO-RIGHT EMBEDDING + * 202B RIGHT-TO-LEFT EMBEDDING + * 202C POP DIRECTIONAL FORMATTING + * 202D LEFT-TO-RIGHT OVERRIDE + * 202E RIGHT-TO-LEFT OVERRIDE + */ + +#define ZERO_WIDTH_CHAR(wc)\ +(((wc) >= 0x200B && (wc) <= 0x200F) || ((wc) >= 0x202A && (wc) <= 0x202E)) + + static PangoEngineRange basic_ranges[] = { /* Basic Latin, Latin-1 Supplement, Latin Extended-A, Latin Extended-B, * IPA Extensions @@ -212,7 +231,7 @@ basic_engine_shape (PangoFont *font, if (pango_get_mirror_char (wc, &mirrored_ch)) wc = mirrored_ch; - if (wc == 0x200B || wc == 0x200E || wc == 0x200F) /* Zero-width characters */ + if (ZERO_WIDTH_CHAR (wc)) { set_glyph (font, glyphs, i, p - text, 0); } diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c index 1d01f64a..ce49a6cd 100644 --- a/modules/basic/basic-x.c +++ b/modules/basic/basic-x.c @@ -25,6 +25,25 @@ #include "pango-engine.h" #include "pango-utils.h" + +/* Zero Width characters: + * + * 200B ZERO WIDTH SPACE + * 200C ZERO WIDTH NON-JOINER + * 200D ZERO WIDTH JOINER + * 200E LEFT-TO-RIGHT MARK + * 200F RIGHT-TO-LEFT MARK + * 202A LEFT-TO-RIGHT EMBEDDING + * 202B RIGHT-TO-LEFT EMBEDDING + * 202C POP DIRECTIONAL FORMATTING + * 202D LEFT-TO-RIGHT OVERRIDE + * 202E RIGHT-TO-LEFT OVERRIDE + */ + +#define ZERO_WIDTH_CHAR(wc)\ +(((wc) >= 0x200B && (wc) <= 0x200F) || ((wc) >= 0x202A && (wc) <= 0x202E)) + + typedef struct _CharRange CharRange; typedef struct _Charset Charset; typedef struct _CharsetOrdering CharsetOrdering; @@ -529,7 +548,7 @@ basic_engine_shape (PangoFont *font, input = buf; } - if (wc == 0x200B || wc == 0x200E || wc == 0x200F) /* Zero-width characters */ + if (ZERO_WIDTH_CHAR (wc)) { set_glyph (font, glyphs, i, p - text, 0); } diff --git a/modules/basic/basic-xft.c b/modules/basic/basic-xft.c index 6552a347..0d2ea653 100644 --- a/modules/basic/basic-xft.c +++ b/modules/basic/basic-xft.c @@ -26,6 +26,25 @@ #include "pango-engine.h" #include "pango-utils.h" + +/* Zero Width characters: + * + * 200B ZERO WIDTH SPACE + * 200C ZERO WIDTH NON-JOINER + * 200D ZERO WIDTH JOINER + * 200E LEFT-TO-RIGHT MARK + * 200F RIGHT-TO-LEFT MARK + * 202A LEFT-TO-RIGHT EMBEDDING + * 202B RIGHT-TO-LEFT EMBEDDING + * 202C POP DIRECTIONAL FORMATTING + * 202D LEFT-TO-RIGHT OVERRIDE + * 202E RIGHT-TO-LEFT OVERRIDE + */ + +#define ZERO_WIDTH_CHAR(wc)\ +(((wc) >= 0x200B && (wc) <= 0x200F) || ((wc) >= 0x202A && (wc) <= 0x202E)) + + static PangoEngineRange basic_ranges[] = { /* Language characters */ { 0x0380, 0x058f, "*" }, @@ -142,7 +161,7 @@ basic_engine_shape (PangoFont *font, input = buf; } - if (wc >= 0x200B && wc <= 0x200F) /* Zero-width characters */ + if (ZERO_WIDTH_CHAR (wc)) { set_glyph (font, glyphs, i, p - text, 0); } -- cgit v1.2.1