commit xterm for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package xterm for openSUSE:Factory checked in at 2014-06-25 06:57:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xterm (Old)
and /work/SRC/openSUSE:Factory/.xterm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xterm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xterm/xterm.changes 2014-06-18 07:47:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xterm.new/xterm.changes 2014-06-25 06:57:52.000000000 +0200
@@ -1,0 +2,30 @@
+Mon Jun 23 08:25:46 UTC 2014 - pcerny@suse.com
+
+- Patch #308 - 2014/06/19
+ * corrected font used for clipping double-width bitmap fonts
+ from patch #307 changes to work around mis-scaled fonts
+ (Debian #752947).
+ * improve wording of a warning message.
+
+-------------------------------------------------------------------
+Wed Jun 18 09:50:15 UTC 2014 - pcerny@suse.com
+
+- Patch #307 - 2014/06/17
+ * fill background for top/bottom parts of
+ double-width/double-height characters, to cover occasional
+ gaps due to bitmap font-scaling (report by Egmont Koblinger).
+ * amend resets for keyboard-type, pointer-mode and title-modes
+ from xterm #305 changes to account for resource settings
+ (Debian #751351).
+ * modify printAttributes feature to include new SGR codes.
+ * modify cursor show/hide logic to work with italic fonts.
+ * do clipping and filling for a case with bitmap-fonts and
+ italics when the font server returns only a "close" match
+ (report/testcase by Egmont Koblinger).
+ * adjust loop comparison for underlining to display underlines
+ on 5x8 font as in patch #304 (Debian #750733).
+ * amend fix for Freedesktop #15979 (Debian #750733).
+ * amend xterm.appdata.xml, making it validate with current
+ schema.
+
+-------------------------------------------------------------------
Old:
----
xterm-306.tgz
xterm-306.tgz.asc
New:
----
xterm-308.tgz
xterm-308.tgz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xterm.spec ++++++
--- /var/tmp/diff_new_pack.oND5H3/_old 2014-06-25 06:57:53.000000000 +0200
+++ /var/tmp/diff_new_pack.oND5H3/_new 2014-06-25 06:57:53.000000000 +0200
@@ -52,7 +52,7 @@
%if 0%{?suse_version} > 1210
Requires: luit
%endif
-Version: 306
+Version: 308
Release: 0
Summary: The basic X terminal program
License: MIT
++++++ xterm-306.tgz -> xterm-308.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/MANIFEST new/xterm-308/MANIFEST
--- old/xterm-306/MANIFEST 2014-06-03 22:25:02.000000000 +0200
+++ new/xterm-308/MANIFEST 2014-06-19 21:58:13.000000000 +0200
@@ -1,4 +1,4 @@
-MANIFEST for xterm-306, version xterm-306
+MANIFEST for xterm-308, version xterm-308
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/cachedGCs.c new/xterm-308/cachedGCs.c
--- old/xterm-306/cachedGCs.c 2011-09-11 16:59:38.000000000 +0200
+++ new/xterm-308/cachedGCs.c 2014-06-13 01:04:07.000000000 +0200
@@ -1,7 +1,7 @@
-/* $XTermId: cachedGCs.c,v 1.61 2011/09/11 14:59:38 tom Exp $ */
+/* $XTermId: cachedGCs.c,v 1.62 2014/06/12 23:04:07 tom Exp $ */
/*
- * Copyright 2007-2010,2011 by Thomas E. Dickey
+ * Copyright 2007-2011,2014 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -120,7 +120,7 @@
#undef CASE
static const char *
-traceVTwin(XtermWidget xw, VTwin * value)
+traceVTwin(XtermWidget xw, VTwin *value)
{
const char *result = "?";
if (value == 0)
@@ -273,7 +273,7 @@
* Returns the appropriate cache pointer.
*/
static CgsCache *
-myCache(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId)
+myCache(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
{
CgsCache *result = 0;
@@ -304,7 +304,7 @@
}
static Drawable
-myDrawable(XtermWidget xw, VTwin * cgsWin)
+myDrawable(XtermWidget xw, VTwin *cgsWin)
{
Drawable drawable = 0;
@@ -316,7 +316,7 @@
}
static GC
-newCache(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, CgsCache * me)
+newCache(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, CgsCache * me)
{
XGCValues xgcv;
XtGCMask mask;
@@ -448,11 +448,12 @@
THIS(used) = 0;
return THIS(gc);
}
+
/*
* Use the "setCgsXXXX()" calls to initialize parameters for a new GC.
*/
void
-setCgsFore(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, Pixel fg)
+setCgsFore(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, Pixel fg)
{
CgsCache *me;
@@ -463,7 +464,7 @@
}
void
-setCgsBack(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, Pixel bg)
+setCgsBack(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, Pixel bg)
{
CgsCache *me;
@@ -475,7 +476,7 @@
#if OPT_DEC_CHRSET
void
-setCgsCSet(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, unsigned cset)
+setCgsCSet(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, unsigned cset)
{
CgsCache *me;
@@ -489,7 +490,7 @@
#endif
void
-setCgsFont(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId, XTermFonts * font)
+setCgsFont(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, XTermFonts * font)
{
CgsCache *me;
@@ -505,8 +506,9 @@
font = &(TScreenOf(xw)->fnts[fNorm]);
}
if (HaveFont(font) && okFont(font->fs)) {
- TRACE2(("...updated next font in %p for %s to %s\n",
- me, traceCgsEnum(cgsId), traceFont(font)));
+ TRACE2(("setCgsFont next: %s for %s slot %p, gc %#x\n",
+ traceFont(font), traceCgsEnum(cgsId),
+ me, (unsigned) THIS(gc)));
TRACE2(("...next font was %s\n", traceFont(NEXT(font))));
NEXT(font) = font;
me->mask |= GCFont;
@@ -523,7 +525,7 @@
* Keep the GC's so we can simply change them rather than creating new ones.
*/
void
-clrCgsFonts(XtermWidget xw, VTwin * cgsWin, XTermFonts * font)
+clrCgsFonts(XtermWidget xw, VTwin *cgsWin, XTermFonts * font)
{
CgsCache *me;
int j, k;
@@ -559,7 +561,7 @@
* Return a GC associated with the given id, allocating if needed.
*/
GC
-getCgsGC(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId)
+getCgsGC(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
{
CgsCache *me;
GC result = 0;
@@ -648,7 +650,7 @@
* Return the font for the given GC.
*/
CgsEnum
-getCgsId(XtermWidget xw, VTwin * cgsWin, GC gc)
+getCgsId(XtermWidget xw, VTwin *cgsWin, GC gc)
{
int n;
CgsEnum result = gcNorm;
@@ -670,7 +672,7 @@
* Return the font for the given GC.
*/
XTermFonts *
-getCgsFont(XtermWidget xw, VTwin * cgsWin, GC gc)
+getCgsFont(XtermWidget xw, VTwin *cgsWin, GC gc)
{
int n;
XTermFonts *result = 0;
@@ -692,7 +694,7 @@
* Return the foreground color for the given GC.
*/
Pixel
-getCgsFore(XtermWidget xw, VTwin * cgsWin, GC gc)
+getCgsFore(XtermWidget xw, VTwin *cgsWin, GC gc)
{
int n;
Pixel result = 0;
@@ -714,7 +716,7 @@
* Return the background color for the given GC.
*/
Pixel
-getCgsBack(XtermWidget xw, VTwin * cgsWin, GC gc)
+getCgsBack(XtermWidget xw, VTwin *cgsWin, GC gc)
{
int n;
Pixel result = 0;
@@ -736,7 +738,7 @@
* Copy the parameters (except GC of course) from one cache record to another.
*/
void
-copyCgs(XtermWidget xw, VTwin * cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
+copyCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
{
if (dstCgsId != srcCgsId) {
CgsCache *me;
@@ -801,7 +803,7 @@
* Swap the cache records, e.g., when doing reverse-video.
*/
void
-swapCgs(XtermWidget xw, VTwin * cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
+swapCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
{
if (dstCgsId != srcCgsId) {
CgsCache *dst;
@@ -826,7 +828,7 @@
* Free any GC associated with the given id.
*/
GC
-freeCgs(XtermWidget xw, VTwin * cgsWin, CgsEnum cgsId)
+freeCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
{
CgsCache *me;
int j;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/charproc.c new/xterm-308/charproc.c
--- old/xterm-306/charproc.c 2014-06-04 01:38:02.000000000 +0200
+++ new/xterm-308/charproc.c 2014-06-13 02:53:14.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: charproc.c,v 1.1359 2014/06/03 23:38:02 tom Exp $ */
+/* $XTermId: charproc.c,v 1.1363 2014/06/13 00:53:14 tom Exp $ */
/*
* Copyright 1999-2013,2014 by Thomas E. Dickey
@@ -7734,7 +7734,10 @@
init_Ires(screen.border);
init_Bres(screen.jumpscroll);
init_Bres(screen.fastscroll);
+
init_Bres(screen.old_fkeys);
+ wnew->screen.old_fkeys0 = wnew->screen.old_fkeys;
+
init_Bres(screen.delete_is_del);
initializeKeyboardType(wnew);
#ifdef ALLOWLOGGING
@@ -7784,6 +7787,8 @@
TScreenOf(wnew)->vtXX_level = (TScreenOf(wnew)->terminal_id / 100);
init_Ires(screen.title_modes);
+ wnew->screen.title_modes0 = wnew->screen.title_modes;
+
init_Bres(screen.visualbell);
init_Bres(screen.flash_line);
init_Ires(screen.visualBellDelay);
@@ -7837,6 +7842,7 @@
TScreenOf(wnew)->pointer_cursor = TScreenOf(request)->pointer_cursor;
init_Ires(screen.pointer_mode);
+ wnew->screen.pointer_mode0 = wnew->screen.pointer_mode;
init_Sres(screen.answer_back);
@@ -8545,7 +8551,9 @@
XFreeCursor(screen->display, screen->hidden_cursor);
xtermCloseFonts(xw, screen->fnts);
+#if OPT_WIDE_ATTRS
xtermCloseFonts(xw, screen->ifnts);
+#endif
noleaks_cachedCgs(xw);
TRACE_FREE_LEAK(screen->selection_targets_8bit);
@@ -8615,6 +8623,7 @@
TRACE_FREE_LEAK(xw->misc.default_font.f_wb);
#endif
+#if OPT_LOAD_VTFONTS || OPT_WIDE_CHARS
for (n = 0; n < NMENUFONTS; ++n) {
for (k = 0; k < fMAX; ++k) {
if (screen->menu_font_names[n][k] !=
@@ -8626,6 +8635,7 @@
}
}
}
+#endif
#if OPT_SELECT_REGEX
for (n = 0; n < NSELECTUNITS; ++n) {
@@ -9929,6 +9939,28 @@
XDrawLines(screen->display, VWindow(screen), outlineGC,
screen->box, NBOX, CoordModePrevious);
} else {
+#if OPT_WIDE_ATTRS
+ int italics_on = ((ld->attribs[cursor_col] & ATR_ITALIC) != 0);
+ int italics_off = ((xw->flags & ATR_ITALIC) != 0);
+ int fix_italics = (italics_on != italics_off);
+ int which_font = (xw->flags & BOLD ? fBold : fNorm);
+
+ if_OPT_WIDE_CHARS(screen, {
+ if (isWide((int) base)) {
+ which_font = (xw->flags & BOLD ? fWBold : fWide);
+ }
+ });
+
+ if (fix_italics) {
+ xtermLoadItalics(xw);
+ if (italics_on) {
+ setCgsFont(xw, currentWin, currentCgs, &screen->ifnts[which_font]);
+ } else {
+ setCgsFont(xw, currentWin, currentCgs, &screen->fnts[which_font]);
+ }
+ }
+ currentGC = getCgsGC(xw, currentWin, currentCgs);
+#endif /* OPT_WIDE_ATTRS */
drawXtermText(xw,
flags & DRAWX_MASK,
@@ -9959,6 +9991,15 @@
XDrawLines(screen->display, VDrawable(screen), outlineGC,
screen->box, NBOX, CoordModePrevious);
}
+#if OPT_WIDE_ATTRS
+ if (fix_italics) {
+ if (italics_on) {
+ setCgsFont(xw, currentWin, currentCgs, &screen->fnts[which_font]);
+ } else {
+ setCgsFont(xw, currentWin, currentCgs, &screen->ifnts[which_font]);
+ }
+ }
+#endif
}
}
screen->cursor_state = ON;
@@ -9986,6 +10027,10 @@
#endif
int cursor_col;
LineData *ld = 0;
+#if OPT_WIDE_ATTRS
+ unsigned attr_flags;
+ int which_font = fNorm;
+#endif
if (screen->cursor_state == OFF)
return;
@@ -10060,6 +10105,24 @@
else
in_selection = True;
+#if OPT_WIDE_ATTRS
+ attr_flags = ld->attribs[cursor_col];
+ if ((attr_flags & ATR_ITALIC) ^ (xw->flags & ATR_ITALIC)) {
+ which_font = (attr_flags & BOLD ? fBold : fNorm);
+
+ if_OPT_WIDE_CHARS(screen, {
+ if (isWide((int) base)) {
+ which_font = (attr_flags & BOLD ? fWBold : fWide);
+ }
+ });
+ setCgsFont(xw, WhichVWin(screen),
+ whichXtermCgs(xw, attr_flags, in_selection),
+ ((attr_flags & ATR_ITALIC)
+ ? &screen->ifnts[which_font]
+ : &screen->fnts[which_font]));
+ }
+#endif
+
currentGC = updatedXtermGC(xw, flags, fg_bg, in_selection);
TRACE(("HideCursor calling drawXtermText cur(%d,%d)\n",
@@ -10091,6 +10154,16 @@
});
#endif
screen->cursor_state = OFF;
+
+#if OPT_WIDE_ATTRS
+ if ((attr_flags & ATR_ITALIC) ^ (xw->flags & ATR_ITALIC)) {
+ setCgsFont(xw, WhichVWin(screen),
+ whichXtermCgs(xw, xw->flags, in_selection),
+ ((xw->flags & ATR_ITALIC)
+ ? &screen->ifnts[which_font]
+ : &screen->fnts[which_font]));
+ }
+#endif
resetXtermGC(xw, flags, in_selection);
refresh_displayed_graphics(screen,
@@ -10335,7 +10408,10 @@
TabReset(xw->tabs);
xw->keyboard.flags = MODE_SRM;
+
+ screen->old_fkeys = screen->old_fkeys0;
initializeKeyboardType(xw);
+
#if OPT_INITIAL_ERASE
if (xw->keyboard.reset_DECBKM == 1)
xw->keyboard.flags |= MODE_DECBKM;
@@ -10349,8 +10425,8 @@
#if OPT_SCROLL_LOCK
xtermClearLEDs(screen);
#endif
- screen->title_modes = DEF_TITLE_MODES;
- screen->pointer_mode = DEF_POINTER_MODE;
+ screen->title_modes = screen->title_modes0;
+ screen->pointer_mode = screen->pointer_mode0;
#if OPT_SIXEL_GRAPHICS
if (TScreenOf(xw)->sixel_scrolling)
xw->keyboard.flags |= MODE_DECSDM;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/fontutils.c new/xterm-308/fontutils.c
--- old/xterm-306/fontutils.c 2014-05-30 10:29:56.000000000 +0200
+++ new/xterm-308/fontutils.c 2014-06-17 22:38:27.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.c,v 1.427 2014/05/30 08:29:56 tom Exp $ */
+/* $XTermId: fontutils.c,v 1.439 2014/06/17 20:38:27 tom Exp $ */
/*
* Copyright 1998-2013,2014 by Thomas E. Dickey
@@ -107,20 +107,20 @@
*/
typedef struct {
/* registry, foundry, family */
- char *beginning;
+ const char *beginning;
/* weight */
- char *weight;
+ const char *weight;
/* slant */
- char *slant;
+ const char *slant;
/* wideness */
- char *wideness;
+ const char *wideness;
/* add style */
- char *add_style;
+ const char *add_style;
int pixel_size;
- char *point_size;
+ const char *point_size;
int res_x;
int res_y;
- char *spacing;
+ const char *spacing;
int average_width;
/* charset registry, charset encoding */
char *end;
@@ -215,7 +215,7 @@
/*
* Returns the fields from start to stop in a dash- separated string. This
- * function will modify the source, putting '\0's in the appropiate place and
+ * function will modify the source, putting '\0's in the appropriate place and
* moving the beginning forward to after the '\0'
*
* This will NOT work for the last field (but we won't need it).
@@ -469,7 +469,7 @@
italic_font_name(FontNameProperties *props, int use_average_width)
{
FontNameProperties myprops = *props;
- myprops.slant = (char *) "o";
+ myprops.slant = "o";
return derive_font_name(&myprops, props->weight, use_average_width, props->end);
}
#endif
@@ -630,6 +630,36 @@
}
/*
+ * Check normal/bold (or wide/wide-bold) font pairs to see if we will be able
+ * to check for missing glyphs in a comparable manner.
+ */
+static int
+comparable_metrics(XFontStruct *normal, XFontStruct *bold)
+{
+#define DATA "comparable_metrics: "
+ int result = 0;
+
+ if (normal->all_chars_exist) {
+ if (bold->all_chars_exist) {
+ result = 1;
+ } else {
+ TRACE((DATA "all chars exist in normal font, but not in bold\n"));
+ }
+ } else if (normal->per_char != 0) {
+ if (bold->per_char != 0) {
+ result = 1;
+ } else {
+ TRACE((DATA "normal font has per-char metrics, but not bold\n"));
+ }
+ } else {
+ TRACE((DATA "normal font is not very good!\n"));
+ result = 1; /* give in (we're not going in reverse) */
+ }
+ return result;
+#undef DATA
+}
+
+/*
* If the font server tries to adjust another font, it may not adjust it
* properly. Check that the bounding boxes are compatible. Otherwise we'll
* leave trash on the display when we mix normal and bold fonts.
@@ -764,10 +794,10 @@
cache_menu_font_name(TScreen *screen, int fontnum, int which, const char *name)
{
if (name != 0) {
- char *last = (char *) screen->menu_font_names[fontnum][which];
+ String last = screen->menu_font_names[fontnum][which];
if (last != 0) {
if (strcmp(last, name)) {
- free(last);
+ FREE_STRING(last);
TRACE(("caching menu fontname %d.%d %s\n", fontnum, which, name));
screen->menu_font_names[fontnum][which] = x_strdup(name);
}
@@ -913,7 +943,6 @@
{
if (!IsEmpty(fnt->fn)) {
XFontStruct *fs = fnt->fs;
- unsigned missing = 0;
unsigned first_char = 0;
unsigned last_char = 0;
unsigned ch;
@@ -926,12 +955,6 @@
last_char = (fs->max_byte1 * 256) + fs->max_char_or_byte2;
}
- for (ch = first_char; ch <= last_char; ++ch) {
- if (xtermMissingChar(ch, fnt)) {
- ++missing;
- }
- }
-
printf("\t%s: %s\n", tag, NonNull(fnt->fn));
printf("\t\tall chars: %s\n", fs->all_chars_exist ? "yes" : "no");
printf("\t\tdefault char: %d\n", fs->default_char);
@@ -941,8 +964,19 @@
printf("\t\tfirst char: %u\n", first_char);
printf("\t\tlast char: %u\n", last_char);
printf("\t\tmaximum-chars: %u\n", countGlyphs(fs));
- printf("\t\tmissing-chars: %u\n", missing);
- printf("\t\tpresent-chars: %u\n", countGlyphs(fs) - missing);
+ if (FontLacksMetrics(fnt)) {
+ printf("\t\tmissing-chars: ?\n");
+ printf("\t\tpresent-chars: ?\n");
+ } else {
+ unsigned missing = 0;
+ for (ch = first_char; ch <= last_char; ++ch) {
+ if (xtermMissingChar(ch, fnt)) {
+ ++missing;
+ }
+ }
+ printf("\t\tmissing-chars: %u\n", missing);
+ printf("\t\tpresent-chars: %u\n", countGlyphs(fs) - missing);
+ }
printf("\t\tmin_byte1: %d\n", fs->min_byte1);
printf("\t\tmax_byte1: %d\n", fs->max_byte1);
printf("\t\tproperties: %d\n", fs->n_properties);
@@ -1015,6 +1049,24 @@
});
}
+#if OPT_TRACE
+static void
+show_font_misses(const char *name, XTermFonts * fp)
+{
+ if (fp->fs != 0) {
+ if (FontLacksMetrics(fp)) {
+ TRACE(("%s font lacks metrics\n", name));
+ } else if (FontIsIncomplete(fp)) {
+ TRACE(("%s font is incomplete\n", name));
+ } else {
+ TRACE(("%s font is complete\n", name));
+ }
+ } else {
+ TRACE(("%s font is missing\n", name));
+ }
+}
+#endif
+
int
xtermLoadFont(XtermWidget xw,
const VTFontNames * fonts,
@@ -1114,7 +1166,8 @@
if (fp == 0 || fnts[fBold].fs == 0) {
xtermCopyFontInfo(&fnts[fBold], &fnts[fNorm]);
TRACE(("...cannot load a matching bold font\n"));
- } else if (same_font_size(xw, fnts[fNorm].fs, fnts[fBold].fs)
+ } else if (comparable_metrics(fnts[fNorm].fs, fnts[fBold].fs)
+ && same_font_size(xw, fnts[fNorm].fs, fnts[fBold].fs)
&& got_bold_font(screen->display, fnts[fBold].fs, myfonts.f_b)) {
TRACE(("...got a matching bold font\n"));
cache_menu_font_name(screen, fontnum, fBold, myfonts.f_b);
@@ -1241,8 +1294,10 @@
if_OPT_WIDE_CHARS(screen, {
if (fnts[fWide].fs != 0
&& fnts[fWBold].fs != 0
- && !same_font_size(xw, fnts[fWide].fs, fnts[fWBold].fs)
- && (is_fixed_font(fnts[fWide].fs) && is_fixed_font(fnts[fWBold].fs))) {
+ && (!comparable_metrics(fnts[fWide].fs, fnts[fWBold].fs)
+ || (!same_font_size(xw, fnts[fWide].fs, fnts[fWBold].fs)
+ && is_fixed_font(fnts[fWide].fs)
+ && is_fixed_font(fnts[fWBold].fs)))) {
TRACE(("...ignoring mismatched normal/bold wide fonts\n"));
xtermCloseFont(xw, &fnts[fWBold]);
xtermCopyFontInfo(&fnts[fWBold], &fnts[fWide]);
@@ -1329,10 +1384,15 @@
{
unsigned ch;
- TRACE(("normal font is %scomplete\n",
- FontIsIncomplete(&fnts[fNorm]) ? "in" : ""));
- TRACE(("bold font is %scomplete\n",
- FontIsIncomplete(&fnts[fBold]) ? "in" : ""));
+#if OPT_TRACE
+#define TRACE_MISS(index) show_font_misses(#index, &fnts[index])
+ TRACE_MISS(fNorm);
+ TRACE_MISS(fBold);
+#if OPT_WIDE_CHARS
+ TRACE_MISS(fWide);
+ TRACE_MISS(fWBold);
+#endif
+#endif
for (ch = 1; ch < 32; ch++) {
unsigned n = ch;
@@ -1474,11 +1534,26 @@
screen->fnts[n].fs,
0)) != 0) {
if ((name = italic_font_name(fp, fp->average_width)) != 0) {
+ TRACE(("xtermLoadItalics #%d %s\n", n, name));
(void) xtermOpenFont(xw,
name,
&(screen->ifnts[n]),
fwResource,
False);
+#if OPT_TRACE
+ {
+ XFontStruct *fs =
+ screen->ifnts[n].fs;
+ if (fs != 0) {
+ TRACE(("...actual size %dx%d (ascent %d, descent %d)\n",
+ fs->ascent +
+ fs->descent,
+ fs->max_bounds.width,
+ fs->ascent,
+ fs->descent));
+ }
+ }
+#endif
free(name);
}
}
@@ -1527,7 +1602,18 @@
}
#define COPY_DEFAULT_FONTS(target, source) \
- target.default_font = source.default_font
+ xtermCopyVTFontNames(&target.default_font, &source.default_font)
+
+static void
+xtermCopyVTFontNames(VTFontNames * target, VTFontNames * source)
+{
+ target->f_n = x_strdup(source->f_n);
+ target->f_b = x_strdup(source->f_b);
+#if OPT_WIDE_CHARS
+ target->f_w = x_strdup(source->f_w);
+ target->f_wb = x_strdup(source->f_wb);
+#endif
+}
void
xtermSaveVTFonts(XtermWidget xw)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/fontutils.h new/xterm-308/fontutils.h
--- old/xterm-306/fontutils.h 2014-05-26 18:48:15.000000000 +0200
+++ new/xterm-308/fontutils.h 2014-06-08 23:10:27.000000000 +0200
@@ -1,4 +1,4 @@
-/* $XTermId: fontutils.h,v 1.93 2014/05/26 16:48:15 tom Exp $ */
+/* $XTermId: fontutils.h,v 1.94 2014/06/08 21:10:27 tom Exp $ */
/*
* Copyright 1998-2013,2014 by Thomas E. Dickey
@@ -64,8 +64,8 @@
#define FontIsIncomplete(font) \
((font)->fs != 0 \
- && ((font)->fs->per_char == 0 \
- || !(font)->fs->all_chars_exist))
+ && (font)->fs->per_char != 0 \
+ && !(font)->fs->all_chars_exist)
#if OPT_BOX_CHARS
@@ -90,8 +90,7 @@
#define IsXtermMissingChar(screen, ch, font) \
(CheckedKnownMissing(font, ch) \
? ((font)->known_missing[(Char)(ch)] > 1) \
- : (FontLacksMetrics(font) \
- || (FontIsIncomplete(font) && xtermMissingChar(ch, font)) \
+ : ((FontIsIncomplete(font) && xtermMissingChar(ch, font)) \
|| ForceBoxChars(screen, ch)))
extern void xtermDrawBoxChar (XtermWidget /* xw */, unsigned /* ch */, unsigned /* attr_flags */, unsigned /* draw_flags */, GC /* gc */, int /* x */, int /* y */, int /* cols */);
@@ -99,7 +98,7 @@
#define IsXtermMissingChar(screen, ch, font) False
#endif
-#if OPT_BOX_CHARS || OPT_REPORT_FONTS
+#if OPT_BOX_CHARS || OPT_REPORT_FONTS
extern Bool xtermMissingChar (unsigned /* ch */, XTermFonts */* font */);
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xterm-306/package/debian/changelog new/xterm-308/package/debian/changelog
--- old/xterm-306/package/debian/changelog 2014-06-04 02:17:14.000000000 +0200
+++ new/xterm-308/package/debian/changelog 2014-06-19 21:58:13.000000000 +0200
@@ -1,3 +1,15 @@
+xterm-dev (308) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey
participants (1)
-
root@hilbert.suse.de