summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDov Grobgeld <dov@src.gnome.org>2002-03-04 08:11:09 +0000
committerDov Grobgeld <dov@src.gnome.org>2002-03-04 08:11:09 +0000
commit859b7cc9500e14df6011dc9e95b99204da7213b6 (patch)
tree410e0e73ada9e7d9ec0fd0d668e03bd3e21cf92c
parent6d7c9de58e4e00fc7d70639b1b8784f402c7c284 (diff)
downloadpango-859b7cc9500e14df6011dc9e95b99204da7213b6.tar.gz
Cosmetic changes:
* Made lone HOLAM have zero width to deal with words like MITZVOT. * Made vowels below VAV right aligned only if the vowel is narrower than the character.
-rw-r--r--modules/hebrew/hebrew-shaper.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/modules/hebrew/hebrew-shaper.c b/modules/hebrew/hebrew-shaper.c
index 007d0e6d..d71f7c55 100644
--- a/modules/hebrew/hebrew-shaper.c
+++ b/modules/hebrew/hebrew-shaper.c
@@ -253,9 +253,20 @@ hebrew_shaper_get_cluster_kerning(gunichar *cluster,
x_offset[0] = 0;
y_offset[0] = 0;
-
+
if (cluster_length == 1)
- return;
+ {
+ /* Make lone 'vav dot' have zero width */
+ if (base_char == UNI_SHIN_DOT
+ || base_char == UNI_SIN_DOT
+ || base_char == UNI_HOLAM
+ ) {
+ x_offset[0] = -ink_rect[0].x - ink_rect[0].width;
+ width[0] = 0;
+ }
+
+ return;
+ }
base_ink_x_offset = ink_rect[0].x;
base_ink_y_offset = ink_rect[0].y;
@@ -323,14 +334,18 @@ hebrew_shaper_get_cluster_kerning(gunichar *cluster,
x_offset[i] = base_ink_x_offset -ink_rect[i].x - ink_rect[i].width * 3/ 2;
}
- /* VOWELS under resh or vav are right aligned */
+ /* VOWELS under resh or vav are right aligned, if they are
+ narrower than the characters. Otherwise they are centered.
+ */
else if ((base_char == UNI_VAV
|| base_char == UNI_RESH
|| base_char == UNI_YOD
|| base_char == UNI_DALED
)
&& ((gl >= UNI_SHEVA && gl <= UNI_QAMATS) ||
- gl == UNI_QUBUTS))
+ gl == UNI_QUBUTS)
+ && width[i] < width[0]
+ )
{
x_offset[i] = base_ink_x_offset + base_ink_width
- ink_rect[i].x - ink_rect[i].width;