gdi32: Make a few definitions private to font.c.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
53acdd5a8a
commit
e1b193d8ba
|
@ -58,6 +58,36 @@ static inline struct font_physdev *get_font_dev( PHYSDEV dev )
|
|||
return (struct font_physdev *)dev;
|
||||
}
|
||||
|
||||
struct gdi_font_family
|
||||
{
|
||||
struct list entry;
|
||||
unsigned int refcount;
|
||||
WCHAR family_name[LF_FACESIZE];
|
||||
WCHAR second_name[LF_FACESIZE];
|
||||
struct list faces;
|
||||
struct gdi_font_family *replacement;
|
||||
};
|
||||
|
||||
struct gdi_font_face
|
||||
{
|
||||
struct list entry;
|
||||
unsigned int refcount;
|
||||
WCHAR *style_name;
|
||||
WCHAR *full_name;
|
||||
WCHAR *file;
|
||||
void *data_ptr;
|
||||
SIZE_T data_size;
|
||||
UINT face_index;
|
||||
FONTSIGNATURE fs;
|
||||
DWORD ntmFlags;
|
||||
DWORD version;
|
||||
DWORD flags; /* ADDFONT flags */
|
||||
BOOL scalable;
|
||||
struct bitmap_font_size size; /* set if face is a bitmap */
|
||||
struct gdi_font_family *family;
|
||||
struct gdi_font_enum_data *cached_enum_data;
|
||||
};
|
||||
|
||||
static const struct font_backend_funcs *font_funcs;
|
||||
|
||||
static const MAT2 identity = { {0,1}, {0,0}, {0,0}, {0,1} };
|
||||
|
@ -1160,6 +1190,21 @@ static void remove_face_from_cache( struct gdi_font_face *face )
|
|||
|
||||
/* font links */
|
||||
|
||||
struct gdi_font_link
|
||||
{
|
||||
struct list entry;
|
||||
struct list links;
|
||||
WCHAR name[LF_FACESIZE];
|
||||
FONTSIGNATURE fs;
|
||||
};
|
||||
|
||||
struct gdi_font_link_entry
|
||||
{
|
||||
struct list entry;
|
||||
FONTSIGNATURE fs;
|
||||
WCHAR family_name[LF_FACESIZE];
|
||||
};
|
||||
|
||||
static struct list font_links = LIST_INIT(font_links);
|
||||
|
||||
static struct gdi_font_link *find_gdi_font_link( const WCHAR *name )
|
||||
|
@ -1704,12 +1749,9 @@ static void free_gdi_font( struct gdi_font *font )
|
|||
HeapFree( GetProcessHeap(), 0, font );
|
||||
}
|
||||
|
||||
void set_gdi_font_names( struct gdi_font *font, const WCHAR *family_name, const WCHAR *style_name,
|
||||
const WCHAR *full_name )
|
||||
static inline const WCHAR *get_gdi_font_name( struct gdi_font *font )
|
||||
{
|
||||
font->otm.otmpFamilyName = (char *)strdupW( family_name );
|
||||
font->otm.otmpStyleName = (char *)strdupW( style_name );
|
||||
font->otm.otmpFaceName = (char *)strdupW( full_name );
|
||||
return (WCHAR *)font->otm.otmpFamilyName;
|
||||
}
|
||||
|
||||
static struct gdi_font *create_gdi_font( const struct gdi_font_face *face, const WCHAR *family_name,
|
||||
|
@ -1727,7 +1769,9 @@ static struct gdi_font *create_gdi_font( const struct gdi_font_face *face, const
|
|||
font->ntmFlags = face->ntmFlags;
|
||||
font->aa_flags = HIWORD( face->flags );
|
||||
if (!family_name) family_name = face->family->family_name;
|
||||
set_gdi_font_names( font, family_name, face->style_name, face->full_name );
|
||||
font->otm.otmpFamilyName = (char *)strdupW( family_name );
|
||||
font->otm.otmpStyleName = (char *)strdupW( face->style_name );
|
||||
font->otm.otmpFaceName = (char *)strdupW( face->full_name );
|
||||
return font;
|
||||
}
|
||||
|
||||
|
|
|
@ -233,10 +233,6 @@ typedef struct {
|
|||
FT_Pos size, x_ppem, y_ppem;
|
||||
} My_FT_Bitmap_Size;
|
||||
|
||||
typedef struct gdi_font_face Face;
|
||||
|
||||
typedef struct gdi_font_family Family;
|
||||
|
||||
struct font_private_data
|
||||
{
|
||||
FT_Face ft_face;
|
||||
|
@ -2131,14 +2127,9 @@ static BOOL CDECL freetype_load_font( struct gdi_font *font )
|
|||
if (!font->aa_flags) font->aa_flags = ADDFONT_AA_FLAGS( default_aa_flags );
|
||||
if (!font->otm.otmpFamilyName)
|
||||
{
|
||||
WCHAR *family_name = ft_face_get_family_name( ft_face, GetSystemDefaultLCID() );
|
||||
WCHAR *style_name = ft_face_get_style_name( ft_face, GetSystemDefaultLangID() );
|
||||
WCHAR *full_name = ft_face_get_full_name( ft_face, GetSystemDefaultLangID() );
|
||||
|
||||
set_gdi_font_names( font, family_name, style_name, full_name );
|
||||
HeapFree( GetProcessHeap(), 0, family_name );
|
||||
HeapFree( GetProcessHeap(), 0, style_name );
|
||||
HeapFree( GetProcessHeap(), 0, full_name );
|
||||
font->otm.otmpFamilyName = (char *)ft_face_get_family_name( ft_face, GetSystemDefaultLCID() );
|
||||
font->otm.otmpStyleName = (char *)ft_face_get_style_name( ft_face, GetSystemDefaultLangID() );
|
||||
font->otm.otmpFaceName = (char *)ft_face_get_full_name( ft_face, GetSystemDefaultLangID() );
|
||||
}
|
||||
|
||||
if (font->scalable)
|
||||
|
@ -3396,7 +3387,7 @@ static BOOL CDECL freetype_set_outline_text_metrics( struct gdi_font *font )
|
|||
GetSystemDefaultLangID() )))
|
||||
{
|
||||
static const WCHAR fake_nameW[] = {'f','a','k','e',' ','n','a','m','e', 0};
|
||||
FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w(get_gdi_font_name(font)));
|
||||
FIXME("failed to read full_nameW for font %s!\n", wine_dbgstr_w((WCHAR *)font->otm.otmpFamilyName));
|
||||
font->otm.otmpFullName = (char *)strdupW(fake_nameW);
|
||||
}
|
||||
needed = sizeof(font->otm) + (strlenW( (WCHAR *)font->otm.otmpFamilyName ) + 1 +
|
||||
|
|
|
@ -303,18 +303,6 @@ struct char_width_info
|
|||
|
||||
typedef struct { FLOAT eM11, eM12, eM21, eM22; } FMAT2;
|
||||
|
||||
struct glyph_metrics;
|
||||
|
||||
struct gdi_font_family
|
||||
{
|
||||
struct list entry;
|
||||
unsigned int refcount;
|
||||
WCHAR family_name[LF_FACESIZE];
|
||||
WCHAR second_name[LF_FACESIZE];
|
||||
struct list faces;
|
||||
struct gdi_font_family *replacement;
|
||||
};
|
||||
|
||||
struct bitmap_font_size
|
||||
{
|
||||
int width;
|
||||
|
@ -325,41 +313,6 @@ struct bitmap_font_size
|
|||
int internal_leading;
|
||||
};
|
||||
|
||||
struct gdi_font_face
|
||||
{
|
||||
struct list entry;
|
||||
unsigned int refcount;
|
||||
WCHAR *style_name;
|
||||
WCHAR *full_name;
|
||||
WCHAR *file;
|
||||
void *data_ptr;
|
||||
SIZE_T data_size;
|
||||
UINT face_index;
|
||||
FONTSIGNATURE fs;
|
||||
DWORD ntmFlags;
|
||||
DWORD version;
|
||||
DWORD flags; /* ADDFONT flags */
|
||||
BOOL scalable;
|
||||
struct bitmap_font_size size; /* set if face is a bitmap */
|
||||
struct gdi_font_family *family;
|
||||
struct gdi_font_enum_data *cached_enum_data;
|
||||
};
|
||||
|
||||
struct gdi_font_link
|
||||
{
|
||||
struct list entry;
|
||||
struct list links;
|
||||
WCHAR name[LF_FACESIZE];
|
||||
FONTSIGNATURE fs;
|
||||
};
|
||||
|
||||
struct gdi_font_link_entry
|
||||
{
|
||||
struct list entry;
|
||||
FONTSIGNATURE fs;
|
||||
WCHAR family_name[LF_FACESIZE];
|
||||
};
|
||||
|
||||
struct gdi_font
|
||||
{
|
||||
struct list entry;
|
||||
|
@ -453,9 +406,6 @@ extern int add_gdi_face( const WCHAR *family_name, const WCHAR *second_name,
|
|||
DWORD ntmflags, DWORD version, DWORD flags,
|
||||
const struct bitmap_font_size *size ) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline const WCHAR *get_gdi_font_name( struct gdi_font *font ) { return (WCHAR *)font->otm.otmpFamilyName; }
|
||||
extern void set_gdi_font_names( struct gdi_font *font, const WCHAR *family_name, const WCHAR *style_name,
|
||||
const WCHAR *full_name ) DECLSPEC_HIDDEN;
|
||||
extern void font_init(void) DECLSPEC_HIDDEN;
|
||||
|
||||
/* freetype.c */
|
||||
|
|
Loading…
Reference in New Issue