[Bug 16745] New: Create Option to Use Fontconfig for Handling Font Hinting and Replacement

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jan 2 22:47:50 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=16745

           Summary: Create Option to Use Fontconfig for Handling Font
                    Hinting and Replacement
           Product: Wine
           Version: 1.1.12
          Platform: All
        OS/Version: other
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: gdi32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: junk1112 at new.rr.com


Created an attachment (id=18416)
 --> (http://bugs.winehq.org/attachment.cgi?id=18416)
Patch to enable fontconfig hinting and replacements

This patch is an attempt to use fontconfig (specifically, what is defined in
/etc/fonts and/or ~/.fonts.conf) to handle the hinting and replacements of
fonts.  This should allow the end user to make WINE programs appear more
integrated with the rest of the desktop, if they choose to enable it.  

The general idea is to inject the fontconfig data at the step in
WineEngCreateFontInstance prior to opening the font face.  This allows the
GdiFont to be satisfied that it is getting the face it requested, and also
rendering it the way fontconfig says to.  This method still allows for the font
replacement mechanism in WINE to work, as this works beneath it, not trying to
compete with it.  The fontconfig data and load flags for freetype are stored in
tagGdiFont, and the load flags are then used in the rendering step.  Also,
Fontconfig initialization was brought out into a separate function, as
fontconfig is now used in more than one place.

As I figured people may not want this on by default, it can be enabled by
setting this DWORD registry key:
HKCU\Software\Wine\Fonts\UseFontconfig = 1

If fontconfig is not available, the code is #ifdef'ed out, and if turned off in
the registry (default), WINE uses its normal behavior. 

I am not a bigtime C coder, and this is my first patch that deals with WINE,
freetype, and fontconfig.  So, there may be memory leaks that need fixing, as
well as poor coding practices and errors. ;)  I have not attempted to handle
every type of configurable feature in fontconfig, just hinting and
replacements, as those are the most major things.  I am basically just a guy
who wanted this feature hard enough to go about figuring out how to do it
myself. 

This patch is against freetype.c from 1.1.12.  I welcome any suggestions and
modifications to this patch, and info on how to get this into the development
version of WINE.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list