2
// --------------------------------------------------------------------
3
// Private fontpool implementation
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2004 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35
// --------------------------------------------------------------------
44
class IpeFontPoolPriv {
49
FTFace *GetFace(XRef *xref, GfxFont *gfxFont);
50
FTFont *GetFont(Ref *id, double m11, double m12,
51
double m21, double m22) const;
53
void RenderCharacter(QPixmap *pixmap, int fontObject,
56
QRgb cRgb, uint charCode, uint uniCode) const;
59
FTFace *TryGetFTFace(XRef *xref, GfxFont *gfxFont);
60
FTFace *TryGetFTFaceFromBuffer(XRef *xref,
61
const char *buffer, int size,
63
FTFace *TrySettingFTFaceMode(FTFace *face, GfxFont *gfxFont);
66
struct EmbeddableFont {
67
int iLatexNumber; //!< Font id in the Pdflatex output: /Fxx
68
int iObjectNumber; //!< Object number in Ipe-created PDF output.
70
IpeString iFontDescriptor;
71
IpeString iStreamDict;
72
IpeBuffer iStreamData;
75
typedef std::list<FTFace *> FTFaceSeq;
76
typedef std::list<FTFont *> FTFontSeq;
77
typedef std::vector<EmbeddableFont> FontSeq;
79
FTFontEngine *iEngine;
82
mutable FTFontSeq iFTFonts;
85
friend class IpeLatex;
86
friend class IpePdfWriter;
89
// --------------------------------------------------------------------