More tweaks. Check only if at least one of those Unicode subrange bits we
1999-12-11 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkfont-win32.c (check_unicode_subranges): More tweaks. Check only if at least one of those Unicode subrange bits we care for is set. If no code page bits are set, guess (wildly) based on the charset.
This commit is contained in:
committed by
Tor Lillqvist
parent
4f5b014220
commit
7df755b181
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/win32/gdkfont-win32.c (check_unicode_subranges): More
|
||||
tweaks. Check only if at least one of those Unicode subrange bits
|
||||
we care for is set. If no code page bits are set, guess (wildly)
|
||||
based on the charset.
|
||||
|
||||
* gdk/win32/gdkinput-win32.c: Remove debugging leftover.
|
||||
|
||||
* gdk/win32/gdkwindow-win32.c (gdk_window_new): Assure title is
|
||||
|
||||
@@ -517,7 +517,8 @@ typedef enum
|
||||
U_SMALL_FORM_VARIANTS = 66,
|
||||
U_ARABIC_PRESENTATION_FORMS_B = 67,
|
||||
U_SPECIALS = 69,
|
||||
U_HALFWIDTH_AND_FULLWIDTH_FORMS = 68
|
||||
U_HALFWIDTH_AND_FULLWIDTH_FORMS = 68,
|
||||
U_LAST_PLUS_ONE
|
||||
} unicode_subset;
|
||||
|
||||
static struct {
|
||||
@@ -696,18 +697,19 @@ static gboolean
|
||||
check_unicode_subranges (UINT charset,
|
||||
FONTSIGNATURE *fsp)
|
||||
{
|
||||
gint i;
|
||||
gboolean retval = FALSE;
|
||||
|
||||
/* If the fsUsb bit array has some bits set, trust it */
|
||||
if (fsp->fsUsb[0] || fsp->fsUsb[1] || fsp->fsUsb[2] || fsp->fsUsb[3])
|
||||
return FALSE;
|
||||
/* If the fsUsb bit array has at least one of the bits set, trust it */
|
||||
for (i = 0; i < U_LAST_PLUS_ONE; i++)
|
||||
if (i != U_PRIVATE_USE_AREA && (fsp->fsUsb[i/32] & (1 << (i % 32))))
|
||||
return FALSE;
|
||||
|
||||
/* Otherwise, guess what subranges there should be in the font */
|
||||
fsp->fsUsb[0] = fsp->fsUsb[1] = fsp->fsUsb[2] = fsp->fsUsb[3] = 0;
|
||||
|
||||
#define set_bit(bitno) (fsp->fsUsb[(bitno)/32] |= (1 << ((bitno) % 32)))
|
||||
|
||||
#if 1
|
||||
/* Set Unicode subrange bits based on code pages supported.
|
||||
* This is mostly just guesswork.
|
||||
*/
|
||||
@@ -868,10 +870,16 @@ check_unicode_subranges (UINT charset,
|
||||
set_bit (U_LATIN_1_SUPPLEMENT);
|
||||
retval = TRUE;
|
||||
}
|
||||
#else
|
||||
/* Guess based on charset. These somewhat optimistic guesses are
|
||||
* based on the table in Appendix M in the book "Developing ..."
|
||||
* mentioned above.
|
||||
|
||||
if (retval)
|
||||
return TRUE;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... No code page bits set!\n"));
|
||||
|
||||
/* Sigh. Not even any code page bits were set. Guess based on
|
||||
* charset, then. These somewhat optimistic guesses are based on the
|
||||
* table in Appendix M in the book "Developing ..." mentioned
|
||||
* above.
|
||||
*/
|
||||
switch (charset)
|
||||
{
|
||||
@@ -1101,7 +1109,6 @@ check_unicode_subranges (UINT charset,
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef set_bit
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user