Репозитории ALT
S: | 1.13a-alt6.20140908 |
4.1: | 1.10a-alt3 |
4.0: | 1.10a-alt3 |
3.0: | 1.10a-alt2 |
Группа :: Офис
Пакет: magicpoint
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: magicpoint-1.13a-tffonts.patch
Скачать
Скачать
--- magicpoint-1.13a/tfont.c.fix5 2009-12-07 11:01:35 +0300
+++ magicpoint-1.13a/tfont.c 2009-12-07 11:02:10 +0300
@@ -170,12 +170,12 @@ tfc_get(code, size, force, registry, cha
if (charset16)
tfc = tfc_lookup(code, size, tf_mcurname, 0);
else {
- if (code >= 0xa0 && ((!registry || !registry[0]) && mgp_charset)){
- regid = get_regid(mgp_charset);
- } else
- regid = get_regid(registry);
+ if ((!registry || !registry[0]) && mgp_charset)
+ registry = mgp_charset;
+
+ regid = get_regid(registry);
tfc = tfc_lookup(code, size, tf_curname[regid], regid);
}
if (tfc == NULL) {
@@ -269,9 +269,15 @@ tfc_setfont(name, charset16, registry)
if (charset16)
tf_mcurname = tfloadedfont[i];
else {
regid = get_regid(registry);
- tf_curname[regid] = tfloadedfont[i];
+
+ //if( registry && *registry )
+ tf_curname[regid] = tfloadedfont[i];
+ //else {
+ // for(i = 0; i < 0; i ++)
+ // tf_curname[i] = tfloadedfont[tfcuridx];
+ //}
}
#if 0
tfc_setsize(char_size);
#endif
@@ -378,9 +384,9 @@ tfc_setfont(name, charset16, registry)
cached:
if (charset16)
tf_mcurname = tfloadedfont[tfcuridx];
else {
- if (registry)
+ if (registry && *registry)
tf_curname[regid] = tfloadedfont[tfcuridx];
else {
/* this should be default font */
for (i = 0; i < 4; i ++)
@@ -413,14 +419,16 @@ tfc_lookup(code, size, fontname, regid)
{
u_int i;
struct tfont *tfc, *htfc;
- if (!fontname)
+ if (!fontname || !fontname[0])
return NULL;
for (i = 0; i < tffontcnt; i ++) {
- if (!strcmp(fontname, tfloadedfont[i]))
- tfcuridx = i;
+ if (!strcmp(fontname, tfloadedfont[i])) {
+ tfcuridx = i;
+ break;
+ }
}
htfc = &tfcache[TFCACHE_HASH(code, size)];
for (tfc = htfc->next; tfc != htfc; tfc = tfc->next) {