On Tue, 2012-03-06 at 09:20 -0500, Behdad Esfahbod wrote: > On 02/22/2012 05:00 PM, Jeremy Moles wrote: > > Hello everyone. I am interested in getting gravity support to work in > > Pango on Windows using the Win32 backend (I haven't tested this using > > hte Fc/FT backend on Windows). > > > > Does anyone have any experience with this? > > Not really. I designed the vertical support in Pango, but I have no clue > about the win32 backend. > > > > Does anyone know where I > > would need to start hacking to add support? I don't mind doing the work, > > but I truly have no idea where to even start. > > Me neither. Debug back from where you see the problem? > > > > In pangowin32-fontmap.c there is a routine: > > > > pango_win32_font_map_load_font > > > > ...and this routine will return a valid PangoFont* UNLESS you have > > gravity set. For whatever reason, the current implementation doesn't > > understand how to handle the "Rotated-*" style that is added inside the > > description when gravity is set. > > Fix this function: pango_win32_face_get_face_name() to also unset gravity. I > find that function gross BTW. > > > > How does gravity actually work in Pango internally? Do the font files on > > disk have to provide some extra hints? > > Not really. The backend needs to load a vertical variant of the font though. > IIRC, on Windows, prepending an '@' character to the beginning of the family > name loads the vertical-metrics variant. So you may want to try that. There, > of course, may be other changes needed. Just search for gravity around the > fontconfig backend and see what's going on...
I'm currently using mingw64 on Fedora16 to cross-compile Pango for Windows. Is there a way to encourage Pango to use a particular backend? I don't mind using Fontconfig/Freetype if I need to; in the end, all that is happening in our code is something very similar to what Clutter does (or did): a PangoGlyphString is fed to our rendering callback function, we use Cairo to rasterize the font into a texture, and maintain our own caching atlas. We don't actually ever use Pango to "draw" anything, we just use its layout and styling engine. I don't know if this simplifies things or not. :) At any rate, I'll try the things you mentioned right away... > > Any help would be appreciated, and thanks beforehand... > > behdad > _______________________________________________ gtk-i18n-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-i18n-list
