Re: Gravity Support / pangowin32



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...


> Any help would be appreciated, and thanks beforehand...

behdad


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