File: docFont.h

package info (click to toggle)
ted 2.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 11,064 kB
  • ctags: 13,935
  • sloc: ansic: 120,446; makefile: 7,469; sh: 253
file content (105 lines) | stat: -rw-r--r-- 3,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/************************************************************************/
/*									*/
/*  Attributes of text.							*/
/*									*/
/************************************************************************/

#   ifndef	DOC_FONT_H
#   define	DOC_FONT_H

#   include	<utilPropMask.h>
#   include	<utilTextAttribute.h>

/************************************************************************/
/*									*/
/*  Font Administration in terms of 'Document Fonts'			*/
/*									*/
/*  1)  A document font is characterized by an item in the font list	*/
/*	in an offce document. The main key is the name of the font.	*/
/*	It is possible that two fonts with the same name exist. In that	*/
/*	case, the character set helps to distinguish between them.	*/
/*									*/
/************************************************************************/

#   define FONTpitchDEFAULT		0
#   define FONTpitchFIXED		1
#   define FONTpitchVARIABLE		2

#   define FONTlenPANOSE		20

typedef struct DocumentFontInstance
    {
    TextAttribute	dfiAttribute;
    int			dfiPhysicalFont;
    int			dfiPsFaceNumber;
    } DocumentFontInstance;

typedef struct DocumentFont
    {
    char *			dfFamilyStyle;	/*  fnil, fswiss ..	*/
    char *			dfName;		/*  Helvetica,		*/
						/*  Helvetica Narrow.	*/
    int				dfDocFamilyNumber;/*  f0, f1 ...	*/

    int				dfPsFamilyNumber;

    int				dfInstanceCount;
    DocumentFontInstance *	dfInstances;

    int				dfCharset;	/*  fcharsetN		*/
    int				dfEncodingUsed;

    int				dfPitch;	/*  fprqN		*/
    char			dfPanose[FONTlenPANOSE+1];
    } DocumentFont;

typedef struct DocumentFontList
    {
    int			dflCount;
    DocumentFont *	dflFonts;
    } DocumentFontList;

/************************************************************************/
/*									*/
/*  Default attributes.							*/
/*									*/
/************************************************************************/

extern TextAttribute   DocDefaultAttributes;

/************************************************************************/
/*									*/
/*  Routine declarations.						*/
/*									*/
/************************************************************************/

extern void docInitFont(	DocumentFont *	df );

extern void docCleanFont(	DocumentFont *	df );

extern int docCopyFont(	DocumentFont *		to,
			const DocumentFont *	from );

extern void docInitFontList(	DocumentFontList *	dfl );

extern void docCleanFontList(	DocumentFontList *	dfl );

extern int docCopyFontList(	DocumentFontList *		to,
				const DocumentFontList *	from );

extern const char *	utilFontFamilyStyle( const char * fontFamilyName );

extern DocumentFont *	docInsertFont(	DocumentFontList *	dfl,
					int			n,
					const char *		familyStyle,
					const char *		fontName );

extern int utilFontCompareFaces(	const void *	veft1,
					const void *	veft2 );

extern int docGetFontByName(	DocumentFontList *	dfl,
				const char *		fontFamilyName,
				int			encoding,
				int			encodingIsDefault );

#   endif	/*  DOC_FONT_H	*/