summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2002-12-21 08:29:54 +0000
committerwlemb <wlemb>2002-12-21 08:29:54 +0000
commit546b51e1039bdeec6498cb54a09414ca98c6c132 (patch)
treeb50c215de4c51d507e6659cce8625a7a7dca71da
parent908ba39d437310a196896f88b76f5368c72a0d2a (diff)
downloadgroff-546b51e1039bdeec6498cb54a09414ca98c6c132.tar.gz
* DviChar.c (Adobe_Symbol_map): Don't include `or'.
* draw.c (AdjustCharDeltas): Apply correction only if nadj > 1. (DoCharacter): Call FlushCharCache if font size and font number differ. Reset `dw->dvi.cache.adjustable' properly.
-rw-r--r--src/xditview/ChangeLog12
-rw-r--r--src/xditview/DviChar.c2
-rw-r--r--src/xditview/draw.c8
3 files changed, 17 insertions, 5 deletions
diff --git a/src/xditview/ChangeLog b/src/xditview/ChangeLog
index cc2df870..667f7d48 100644
--- a/src/xditview/ChangeLog
+++ b/src/xditview/ChangeLog
@@ -1,3 +1,11 @@
+2002-12-20 Werner LEMBERG <wl@gnu.org>
+
+ * DviChar.c (Adobe_Symbol_map): Don't include `or'.
+ * draw.c (AdjustCharDeltas): Apply correction only if nadj > 1.
+ (DoCharacter): Call FlushCharCache if font size and font number
+ differ.
+ Reset `dw->dvi.cache.adjustable' properly.
+
2002-12-09 Werner LEMBERG <wl@gnu.org>
* DviChar.c (ISO_8859_1_map): Use `tno' symbol instead of `no'.
@@ -446,11 +454,11 @@ Sun May 26 14:14:01 1991 James Clark (jjc at jclark)
* draw.c: Rewritten so as not to assume device and display
resolution is the same.
* DviP.h: Include device.h. Add device_font member to DviFontList.
- Add adjustable arrary to DviCharCache. Add text_x_width,
+ Add adjustable array to DviCharCache. Add text_x_width,
text_device_width, word_flag, device_font, device_font_number,
device, native, device_resolution, display_resolution,
paperlength, paperwidth, scale_factor, sizescale members.
- * Dvi.c (Initialize): Initialize new variable used by draw.c
+ * Dvi.c (Initialize): Initialize new variable used by draw.c.
(Destroy): Call device_destroy.
* font.c (MaxFontPosition): New function.
(LookupFontSizeBySize): Handle sizescale.
diff --git a/src/xditview/DviChar.c b/src/xditview/DviChar.c
index bd611159..ee8264d6 100644
--- a/src/xditview/DviChar.c
+++ b/src/xditview/DviChar.c
@@ -518,7 +518,7 @@ static DviCharNameMap Adobe_Symbol_map = {
{ "*q", /* 121 */},
{ "*z", /* 122 */},
{ "lC", "{", /* 123 */},
-{ "ba", "or", "|", /* 124 */},
+{ "ba", "|", /* 124 */},
{ "rC", "}", /* 125 */},
{ "ap", /* 126 */},
{ 0, /* 127 */},
diff --git a/src/xditview/draw.c b/src/xditview/draw.c
index 69e86cd6..fe7c80f7 100644
--- a/src/xditview/draw.c
+++ b/src/xditview/draw.c
@@ -68,9 +68,9 @@ AdjustCacheDeltas (dw)
for (i = 0; i <= dw->dvi.cache.index; i++)
if (dw->dvi.cache.adjustable[i])
++nadj;
- if (nadj == 0)
- return;
dw->dvi.text_x_width += extra;
+ if (nadj <= 1)
+ return;
for (i = 0; i <= dw->dvi.cache.index; i++)
if (dw->dvi.cache.adjustable[i]) {
int x;
@@ -181,6 +181,7 @@ DoCharacter (dw, c, wid)
|| dw->dvi.cache.char_index >= DVI_CHAR_CACHE_SIZE) {
FlushCharCache (dw);
x = dw->dvi.cache.x;
+ dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0;
}
/*
* load a new font, if the current block is not empty,
@@ -189,6 +190,8 @@ DoCharacter (dw, c, wid)
if (dw->dvi.cache.font_size != dw->dvi.state->font_size ||
dw->dvi.cache.font_number != dw->dvi.state->font_number)
{
+ FlushCharCache (dw);
+ x = dw->dvi.cache.x;
dw->dvi.cache.font_size = dw->dvi.state->font_size;
dw->dvi.cache.font_number = dw->dvi.state->font_number;
dw->dvi.cache.font = QueryFont (dw,
@@ -208,6 +211,7 @@ DoCharacter (dw, c, wid)
if (dw->dvi.cache.index >= dw->dvi.cache.max)
FlushCharCache (dw);
dw->dvi.cache.cache[dw->dvi.cache.index].nchars = 0;
+ dw->dvi.cache.adjustable[dw->dvi.cache.index] = 0;
}
dw->dvi.cache.adjustable[dw->dvi.cache.index]
= dw->dvi.word_flag;