Репозитории ALT
S: | 3.2.9-alt1 |
5.1: | 3.2.5_alpha5-alt12 |
4.1: | 3.2.4-alt3 |
4.0: | 3.2.4-alt3 |
3.0: | 3.2.4-alt2 |
Группа :: Графика
Пакет: xfig
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 0004-init_font-improve-debug-mode-output.patch
Скачать
Скачать
From f0c0cf7f89f79392fdb95fdb9050e76c0282eb76 Mon Sep 17 00:00:00 2001
From: Vladislav Zavjalov <slazav@altlinux.org>
Date: Fri, 8 Jan 2021 10:25:01 +0000
Subject: [PATCH 1/5] init_font: improve debug-mode output
---
xfig/src/w_drawprim.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/xfig/src/w_drawprim.c b/xfig/src/w_drawprim.c
index f6d50ee..8834d3a 100644
--- a/xfig/src/w_drawprim.c
+++ b/xfig/src/w_drawprim.c
@@ -131,12 +131,16 @@ void init_font(void)
server really has them by checking for font of 0-0 size */
openwinfonts = False;
if (appres.scalablefonts) {
+ if (appres.DEBUG)
+ fprintf(stderr,"Looking for scalable fonts:\n");
/* first look for OpenWindow style font names (e.g. times-roman) */
if ((fontlist = XListFonts(tool_d, ps_fontinfo[1].name, 1, &count))!=0) {
openwinfonts = True; /* yes, use them */
for (f=0; f<NUM_FONTS; f++) { /* copy the OpenWindow font names */
x_fontinfo[f].template = ps_fontinfo[f+1].name;
font_scalable[f] = True;
+ if (appres.DEBUG)
+ fprintf(stderr,"Font %d: %s -- openwindow\n", f, ps_fontinfo[f+1].name);
}
XFreeFontNames(fontlist);
} else {
@@ -154,8 +158,11 @@ void init_font(void)
else
strcat(template,"*-*");
- if ((fontlist = XListFonts(tool_d, template, 1, &count)))
+ if ((fontlist = XListFonts(tool_d, template, 1, &count))){
+ if (appres.DEBUG)
+ fprintf(stderr,"Font %d: %s -- scalable\n", f, template);
font_scalable[f] = True;
+ }
else
font_scalable[f] = False;
@@ -167,6 +174,8 @@ void init_font(void)
/* no scalable fonts - query the server for all the font
names and sizes and build a list of them */
+ if (appres.DEBUG)
+ fprintf(stderr,"Looking for fixed fonts:\n");
for (f = 0; f < NUM_FONTS; f++) {
if (!font_scalable[f]) {
nf = NULL;
@@ -223,7 +232,7 @@ void init_font(void)
nf = newfont; /* keep current ptr */
nf->size = ss; /* store the size here */
if (appres.DEBUG)
- fprintf(stderr,"Font: %s\n",flist[i].fn);
+ fprintf(stderr,"Font %d: %s\n",f, flist[i].fn);
nf->fname = flist[i].fn; /* keep actual name */
nf->fstruct = NULL;
nf->fset = NULL;
--
2.24.1