Re: --gtk-unbuffered



At 12:32 28.02.01 -0500, Owen Taylor wrote:
>
>Hans Breuer <hans breuer org> writes:
>
>> At 14:49 27.02.01 +0200, Tor Lillqvist wrote:
>> >> * alex looks at the win32 pango code.
>> >> * alex screams in pain.
>> >
>> >Yup, I have not claimed that it would be even close to ready. I
>> >haven't done much any work on it for months, I know. Personally I
>> >would vote for using the FreeType2 Pango backend for GDK on Win32,
>> >because the (portable portion of the) native Win32 font API just
>> >sucks. And, as more people have worked on the FreeType2 Pango code, it
>> >should be of better quality.
>
>I really think that Pango should be using native fonts on Win32 when
>possible. If not, Pango/Win32 will have inferior quality/speed of
>rendering to other applications on windows, and to X11.
>
AFAIR the freetypes website claims at least better quality than Win32
built-in. Probably I should check the performance of the freetype rendering
on my apparently rather slow notebook ...

>(While the future direction of X is towards client side fonts and
>FreeType, rendering is still done with specialized server support.)
>
>Also, integration with system font installation and naming may be
>compromised if the system font names are bypassed.
>
Could you explain this in more detail ? I recently added the following code
to pango/win32, but it appears to be a little bogus. IHMO there should be a
default built-in mapping between "Sans", "Sans Italic", ..., "monospace",
"serif" to common fonts on windoze. But I'm uncertain how to do this the
pango way. This is what it has now:

diff --exclude-from=c:\util\tool\diff.ign -u -r
from-cvs/pango/pango/pangowin32-fontmap.c
my-gtk/pango/pango/pangowin32-fontmap.c
--- from-cvs/pango/pango/pangowin32-fontmap.c	Sat Feb 10 11:26:42 2001
+++ my-gtk/pango/pango/pangowin32-fontmap.c	Sun Feb 18 17:48:48 2001
@@ -239,6 +239,25 @@
   logfont.lfCharSet = DEFAULT_CHARSET;
   EnumFontFamiliesEx (pango_win32_hdc, &logfont, (FONTENUMPROC)
pango_win32_enum_proc, 0, 0);
 
+  /* There are fonts installed on every system, use these
+   * as fallback. Otherwise Really Bad Things (tm) would 
+   * happen without an alias file ...
+   * (The names are required for Pango and may be resolved
+   *  to different fonts on different systems)
+   */
+  memset (&logfont, 0, sizeof (logfont));
+  strcpy (logfont.lfFaceName, "monospace");
+  logfont.lfPitchAndFamily = FF_MODERN;
+  pango_win32_insert_font (fontmap, &logfont);
+
+  strcpy (logfont.lfFaceName, "sans");
+  logfont.lfPitchAndFamily = FF_SWISS; 
+  pango_win32_insert_font (fontmap, &logfont);
+
+  strcpy (logfont.lfFaceName, "serif");
+  logfont.lfPitchAndFamily = FF_ROMAN; 
+  pango_win32_insert_font (fontmap, &logfont);
+
   pango_win32_font_map_read_aliases (fontmap);
 
   SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0);
  
>I don't have a very good idea of where the Win32 font APIs are and
>where they are going; the start was certainly rather crude, and
>they've certainly have made quite a few changes a long the way, as
>well as adding new subsystems recently with Uniscribe and OTLS. (I'm
>not sure if OTLS is or will be part of newer versions of Windows, or
>is simply something they are licensing commercially to application
>vendors.)
>
It officially sucks. E.g.: the nice function GetGlyphOutline (...
GGO_METRICS ...), which appears to be designed for
pango_win32_font_get_glyph_extents seems to have no implementation at all
on win98 and NT4.0 ...
(Or is there any Font Rendering Service Pack I'm missing?)

>So, it may be hard to make a Pango backend that is both fully
>functional and can work with all Win32 platforms.
>
It depends on the definition of "fully functional". The basic support seems
to be there now and version specific improvements could be well intergrated
in optimized member functions for PangoWin32FontClass.

>But, since Pango is meant to the font handling away from the
>application, and even, mostly, the toolkit, it is certainly possible
>to use Win32 backend in some cases, and fall back to a FreeType
>backend on older platforms.
>
So the way to go maybe to build Pango with built-in win32 font renderer (as
I currently do with MSVC) and provide the ability to "overload" it by
runtime configurable ft2 rendering ?

>> >If Hans still would prefer to use the native Win32 Pango backend, it
>> >probably can relatively easily be made into a runtime choice in GDK
>> >(on Win32) which Pango backend to use?
>
>The X11 port has a runtime choice of backend (X11 or Xft), so it
>certainly is not hard.
>
Have Fun,
	Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]