Rev 1179 | Rev 1187 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | paul | 1 | /*************************************************************************** |
2 | scribusdoc.cpp - description |
||
3 | ------------------- |
||
4 | begin : Fre Apr 6 21:47:55 CEST 2001 |
||
5 | copyright : (C) 2001 by Franz Schmid |
||
6 | email : Franz.Schmid@altmuehlnet.de |
||
7 | ***************************************************************************/ |
||
8 | |||
9 | /*************************************************************************** |
||
10 | * * |
||
11 | * This program is free software; you can redistribute it and/or modify * |
||
12 | * it under the terms of the GNU General Public License as published by * |
||
13 | * the Free Software Foundation; either version 2 of the License, or * |
||
14 | * (at your option) any later version. * |
||
15 | * * |
||
16 | ***************************************************************************/ |
||
17 | |||
18 | #include "scribusdoc.h" |
||
410 | Franz | 19 | #include "scribusXml.h" |
20 | #include "scribus.h" |
||
456 | fschmid | 21 | #include "page.h" |
22 | #include "pageitem.h" |
||
1179 | tsoots | 23 | #include "undomanager.h" |
24 | #include "undostate.h" |
||
25 | #include <qfile.h> |
||
410 | Franz | 26 | |
1179 | tsoots | 27 | extern QPixmap loadIcon(QString nam); |
28 | |||
1065 | cbradney | 29 | ScribusDoc::ScribusDoc(struct ApplicationPrefs *prefsData) |
1179 | tsoots | 30 | : UndoObject(QObject::tr("Document")) |
3 | paul | 31 | { |
823 | fschmid | 32 | prefsValues = prefsData; |
167 | Franz | 33 | modified = false; |
34 | MasterP = false; |
||
823 | fschmid | 35 | UsedFonts.clear(); |
36 | FT_Init_FreeType( &library ); |
||
37 | AllFonts = &prefsData->AvailFonts; |
||
38 | AddFont(prefsData->DefFont, prefsData->AvailFonts[prefsData->DefFont]->Font); |
||
39 | Dfont = prefsData->DefFont; |
||
40 | Dsize = prefsData->DefSize; |
||
879 | fschmid | 41 | guidesSettings.marginsShown = prefsData->guidesSettings.marginsShown; |
42 | guidesSettings.framesShown = prefsData->guidesSettings.framesShown; |
||
43 | guidesSettings.gridShown = prefsData->guidesSettings.gridShown; |
||
44 | guidesSettings.guidesShown = prefsData->guidesSettings.guidesShown; |
||
45 | guidesSettings.baseShown = prefsData->guidesSettings.baseShown; |
||
46 | guidesSettings.linkShown = prefsData->guidesSettings.linkShown; |
||
47 | guidesSettings.showPic = prefsData->guidesSettings.showPic; |
||
48 | guidesSettings.grabRad = prefsData->guidesSettings.grabRad; |
||
49 | guidesSettings.guideRad = prefsData->guidesSettings.guideRad; |
||
50 | guidesSettings.minorGrid = prefsData->guidesSettings.minorGrid; |
||
51 | guidesSettings.majorGrid = prefsData->guidesSettings.majorGrid; |
||
52 | guidesSettings.minorColor = prefsData->guidesSettings.minorColor; |
||
53 | guidesSettings.majorColor = prefsData->guidesSettings.majorColor; |
||
823 | fschmid | 54 | papColor = prefsData->DpapColor; |
879 | fschmid | 55 | guidesSettings.margColor = prefsData->guidesSettings.margColor; |
56 | guidesSettings.guideColor = prefsData->guidesSettings.guideColor; |
||
57 | guidesSettings.baseColor = prefsData->guidesSettings.baseColor; |
||
823 | fschmid | 58 | PageColors.clear(); |
59 | PageColors.insert("Black", CMYKColor(0, 0, 0, 255)); |
||
60 | PageColors.insert("White", CMYKColor(0, 0, 0, 0)); |
||
61 | if (prefsData->Dpen != "None") |
||
62 | PageColors.insert(prefsData->Dpen, prefsData->DColors[prefsData->Dpen]); |
||
63 | Dpen = prefsData->Dpen; |
||
64 | if (prefsData->DpenLine != "None") |
||
65 | PageColors.insert(prefsData->DpenLine, prefsData->DColors[prefsData->DpenLine]); |
||
66 | DpenLine = prefsData->DpenLine; |
||
67 | if (prefsData->DpenText != "None") |
||
68 | PageColors.insert(prefsData->DpenText, prefsData->DColors[prefsData->DpenText]); |
||
69 | DpenText = prefsData->DpenText; |
||
70 | if (prefsData->DstrokeText != "None") |
||
71 | PageColors.insert(prefsData->DstrokeText, prefsData->DColors[prefsData->DstrokeText]); |
||
72 | DstrokeText = prefsData->DstrokeText; |
||
73 | if (prefsData->Dbrush != "None") |
||
74 | PageColors.insert(prefsData->Dbrush, prefsData->DColors[prefsData->Dbrush]); |
||
75 | Dbrush = prefsData->Dbrush; |
||
76 | if (prefsData->DbrushPict != "None") |
||
77 | PageColors.insert(prefsData->DbrushPict, prefsData->DColors[prefsData->DbrushPict]); |
||
78 | DbrushPict = prefsData->DbrushPict; |
||
79 | typographicSetttings.valueSuperScript = prefsData->typographicSetttings.valueSuperScript; |
||
80 | typographicSetttings.scalingSuperScript = prefsData->typographicSetttings.scalingSuperScript; |
||
81 | typographicSetttings.valueSubScript = prefsData->typographicSetttings.valueSubScript; |
||
82 | typographicSetttings.scalingSubScript = prefsData->typographicSetttings.scalingSubScript; |
||
83 | typographicSetttings.valueSmallCaps = prefsData->typographicSetttings.valueSmallCaps; |
||
84 | typographicSetttings.autoLineSpacing = prefsData->typographicSetttings.autoLineSpacing; |
||
85 | typographicSetttings.valueBaseGrid = prefsData->typographicSetttings.valueBaseGrid; |
||
86 | typographicSetttings.offsetBaseGrid = prefsData->typographicSetttings.offsetBaseGrid; |
||
87 | Dshade = prefsData->Dshade; |
||
88 | Dshade2 = prefsData->Dshade2; |
||
89 | ShadePict = prefsData->ShadePict; |
||
90 | ScaleX = prefsData->ScaleX; |
||
91 | ScaleY = prefsData->ScaleY; |
||
92 | ScaleType = prefsData->ScaleType; |
||
93 | AspectRatio = prefsData->AspectRatio; |
||
94 | DCols = prefsData->DCols; |
||
95 | DGap = prefsData->DGap; |
||
96 | DLineArt = PenStyle(prefsData->DLineArt); |
||
97 | Dwidth = prefsData->Dwidth; |
||
98 | DshadeLine = prefsData->DshadeLine; |
||
99 | DLstyleLine = PenStyle(prefsData->DLstyleLine); |
||
100 | DwidthLine = prefsData->DwidthLine; |
||
101 | DstartArrow = prefsData->DstartArrow; |
||
102 | DendArrow = prefsData->DendArrow; |
||
103 | PolyC = prefsData->PolyC; |
||
104 | PolyF = prefsData->PolyF; |
||
105 | PolyS = prefsData->PolyS; |
||
106 | PolyFd = prefsData->PolyFd; |
||
107 | PolyR = prefsData->PolyR; |
||
108 | MagMin = prefsData->MagMin; |
||
109 | MagMax = prefsData->MagMax; |
||
110 | MagStep = prefsData->MagStep; |
||
111 | Before = prefsData->Before; |
||
1065 | cbradney | 112 | docUnitIndex = prefsData->docUnitIndex; |
113 | marginColored = prefsData->marginColored; |
||
823 | fschmid | 114 | Language = prefsData->Language; |
115 | MinWordLen = prefsData->MinWordLen; |
||
116 | HyCount = prefsData->HyCount; |
||
117 | Automatic = prefsData->Automatic; |
||
118 | AutoCheck = prefsData->AutoCheck; |
||
3 | paul | 119 | GuideLock = false; |
120 | SnapGuides = false; |
||
167 | Franz | 121 | useRaster = false; |
122 | EditClip = false; |
||
123 | EditClipMode = 0; |
||
124 | loading = false; |
||
178 | Franz | 125 | DocName = QObject::tr("Document")+"-"; |
3 | paul | 126 | CurrentSel = -1; |
127 | DocTitel = ""; |
||
128 | DocAutor = ""; |
||
129 | DocComments = ""; |
||
68 | Franz | 130 | DocKeyWords = ""; |
330 | Franz | 131 | DocPublisher = ""; |
132 | DocDate = ""; |
||
133 | DocType = ""; |
||
134 | DocFormat = ""; |
||
135 | DocIdent = ""; |
||
136 | DocSource = ""; |
||
137 | DocLangInfo = ""; |
||
138 | DocRelation = ""; |
||
139 | DocCover = ""; |
||
140 | DocRights = ""; |
||
141 | DocContrib = ""; |
||
3 | paul | 142 | PageC = 0; |
143 | LastAuto = 0; |
||
144 | FirstAuto = 0; |
||
145 | DraggedElem = 0; |
||
146 | GroupCounter = 1; |
||
1065 | cbradney | 147 | docParagraphStyles.clear(); |
148 | struct ParagraphStyle vg; |
||
3 | paul | 149 | vg.Vname = "Normal Internal"; |
150 | vg.LineSpa = 15; |
||
1065 | cbradney | 151 | vg.textAlignment = 0; |
3 | paul | 152 | vg.Indent = 0; |
153 | vg.First = 0; |
||
1065 | cbradney | 154 | vg.gapBefore = 0; |
155 | vg.gapAfter = 0; |
||
3 | paul | 156 | vg.Font = ""; |
157 | vg.FontSize = Dsize; |
||
140 | Franz | 158 | vg.TabValues.clear(); |
153 | Franz | 159 | vg.Drop = false; |
160 | vg.DropLin = 2; |
||
173 | Franz | 161 | vg.FontEffect = 0; |
162 | vg.FColor = Dbrush; |
||
163 | vg.FShade = Dshade; |
||
164 | vg.SColor = Dpen; |
||
165 | vg.SShade = Dshade2; |
||
241 | Franz | 166 | vg.BaseAdj = false; |
1065 | cbradney | 167 | docParagraphStyles.append(vg); |
3 | paul | 168 | vg.Vname = "Center Internal"; |
1065 | cbradney | 169 | vg.textAlignment = 1; |
170 | docParagraphStyles.append(vg); |
||
3 | paul | 171 | vg.Vname = "Rechts Internal"; |
1065 | cbradney | 172 | vg.textAlignment = 2; |
173 | docParagraphStyles.append(vg); |
||
3 | paul | 174 | vg.Vname = "Block Internal"; |
1065 | cbradney | 175 | vg.textAlignment = 3; |
176 | docParagraphStyles.append(vg); |
||
3 | paul | 177 | vg.Vname = "EBlock Internal"; |
1065 | cbradney | 178 | vg.textAlignment = 4; |
179 | docParagraphStyles.append(vg); |
||
3 | paul | 180 | Layers.clear(); |
181 | struct Layer ll; |
||
182 | ll.LNr = 0; |
||
183 | ll.Level = 0; |
||
178 | Franz | 184 | ll.Name = QObject::tr("Background"); |
1065 | cbradney | 185 | ll.isViewable = true; |
186 | ll.isPrintable = true; |
||
3 | paul | 187 | Layers.append(ll); |
188 | ActiveLayer = 0; |
||
189 | JavaScripts.clear(); |
||
190 | UnDoValid = false; |
||
191 | UnData.UnCode = -1; |
||
167 | Franz | 192 | CurrentStyle = 0; |
1065 | cbradney | 193 | currentParaStyle = 0; |
3 | paul | 194 | TotalItems = 0; |
195 | TemplateMode = false; |
||
196 | PDF_Optionen.Thumbnails = false; |
||
197 | PDF_Optionen.Articles = false; |
||
198 | PDF_Optionen.Compress = true; |
||
202 | Franz | 199 | PDF_Optionen.CompressMethod = 0; |
200 | PDF_Optionen.Quality = 0; |
||
3 | paul | 201 | PDF_Optionen.RecalcPic = false; |
202 | PDF_Optionen.Bookmarks = false; |
||
203 | PDF_Optionen.PicRes = 300; |
||
203 | Franz | 204 | PDF_Optionen.Version = 14; |
3 | paul | 205 | PDF_Optionen.Resolution = 300; |
206 | PDF_Optionen.Binding = 0; |
||
207 | PDF_Optionen.EmbedList.clear(); |
||
476 | fschmid | 208 | PDF_Optionen.SubsetList.clear(); |
420 | Franz | 209 | PDF_Optionen.MirrorH = false; |
469 | fschmid | 210 | PDF_Optionen.MirrorV = false; |
454 | fschmid | 211 | PDF_Optionen.RotateDeg = 0; |
3 | paul | 212 | PDF_Optionen.PresentMode = false; |
213 | PDF_Optionen.Datei = ""; |
||
214 | PDF_Optionen.PresentVals.clear(); |
||
203 | Franz | 215 | PDF_Optionen.UseRGB = true; |
3 | paul | 216 | PDF_Optionen.UseProfiles = false; |
217 | PDF_Optionen.UseProfiles2 = false; |
||
218 | PDF_Optionen.SolidProf = ""; |
||
219 | PDF_Optionen.SComp = 3; |
||
220 | PDF_Optionen.ImageProf = ""; |
||
221 | PDF_Optionen.PrintProf = ""; |
||
222 | PDF_Optionen.Info = ""; |
||
223 | PDF_Optionen.Intent = 0; |
||
224 | PDF_Optionen.Intent2 = 0; |
||
225 | PDF_Optionen.BleedTop = 0; |
||
226 | PDF_Optionen.BleedLeft = 0; |
||
227 | PDF_Optionen.BleedRight = 0; |
||
228 | PDF_Optionen.BleedBottom = 0; |
||
229 | PDF_Optionen.EmbeddedI = false; |
||
230 | PDF_Optionen.Encrypt = false; |
||
231 | PDF_Optionen.PassOwner = ""; |
||
232 | PDF_Optionen.PassUser = ""; |
||
233 | PDF_Optionen.Permissions = -4; |
||
337 | Franz | 234 | PDF_Optionen.UseLPI = false; |
235 | PDF_Optionen.LPISettings.clear(); |
||
3 | paul | 236 | RePos = false; |
237 | BookMarks.clear(); |
||
238 | OldBM = false; |
||
239 | hasName = false; |
||
63 | Franz | 240 | DoDrawing = true; |
3 | paul | 241 | RotMode = 0; |
123 | Franz | 242 | SubMode = -1; |
3 | paul | 243 | ASaveTimer = new QTimer(this); |
27 | Franz | 244 | MLineStyles.clear(); |
456 | fschmid | 245 | Pages.clear(); |
246 | MasterPages.clear(); |
||
247 | DocPages.clear(); |
||
248 | Items.clear(); |
||
249 | MasterItems.clear(); |
||
250 | DocItems.clear(); |
||
823 | fschmid | 251 | ScratchLeft = prefsData->ScratchLeft; |
252 | ScratchRight = prefsData->ScratchRight; |
||
253 | ScratchTop = prefsData->ScratchTop; |
||
254 | ScratchBottom = prefsData->ScratchBottom; |
||
255 | arrowStyles = prefsData->arrowStyles; |
||
1179 | tsoots | 256 | undoManager = UndoManager::instance(); |
257 | uGuideLockPixmap = loadIcon("u_margins_locked.png"); |
||
3 | paul | 258 | } |
259 | |||
260 | ScribusDoc::~ScribusDoc() |
||
261 | { |
||
456 | fschmid | 262 | MasterItems.setAutoDelete(true); |
263 | DocItems.setAutoDelete(true); |
||
264 | MasterItems.clear(); |
||
265 | DocItems.clear(); |
||
266 | MasterPages.setAutoDelete(true); |
||
267 | DocPages.setAutoDelete(true); |
||
268 | MasterPages.clear(); |
||
269 | DocPages.clear(); |
||
494 | fschmid | 270 | QMap<QString,QFont>::Iterator it3; |
271 | for (it3 = UsedFonts.begin(); it3 != UsedFonts.end(); ++it3) |
||
272 | { |
||
273 | if ((*AllFonts)[it3.key()]->PrivateFont != "") |
||
274 | (*AllFonts).removeFont(it3.key()); |
||
275 | } |
||
3 | paul | 276 | FT_Done_FreeType( library ); |
277 | } |
||
278 | |||
456 | fschmid | 279 | /* |
280 | * Split out from loadStyles in editFormats.cpp so it's callable from anywhere, |
||
281 | * including plugins. |
||
282 | * - 2004-09-14 Craig Ringer |
||
283 | */ |
||
1065 | cbradney | 284 | void ScribusDoc::loadStylesFromFile(QString fileName, QValueList<ParagraphStyle> *tempStyles) |
456 | fschmid | 285 | { |
1065 | cbradney | 286 | // This won't create the QValueList<ParagraphStyle> will it? |
287 | QValueList<ParagraphStyle> *wrkStyles = NULL; |
||
456 | fschmid | 288 | /* |
289 | * Use the working styles struct if passed, or work directly |
||
290 | * on the document styles otherwise. Note that tempStyles, |
||
291 | * if passed, MUST have the first five styles initialised already |
||
292 | * or this function will segfault. |
||
293 | */ |
||
294 | if (tempStyles != NULL) |
||
295 | wrkStyles = tempStyles; |
||
296 | else |
||
1065 | cbradney | 297 | wrkStyles = &docParagraphStyles; |
456 | fschmid | 298 | if (!fileName.isEmpty()) |
299 | { |
||
300 | ScriXmlDoc *ss = new ScriXmlDoc(); |
||
1065 | cbradney | 301 | ss->docParagraphStyles.clear(); |
456 | fschmid | 302 | for (uint x = 5; x < wrkStyles->count(); ++x) |
1065 | cbradney | 303 | ss->docParagraphStyles.append((*wrkStyles)[x]); |
456 | fschmid | 304 | uint old = wrkStyles->count()-5; |
823 | fschmid | 305 | if (ss->ReadStyles(fileName, this, prefsValues)) |
456 | fschmid | 306 | { |
1065 | cbradney | 307 | if (ss->docParagraphStyles.count() > old) |
456 | fschmid | 308 | { |
1065 | cbradney | 309 | for (uint xx=old; xx<ss->docParagraphStyles.count(); ++xx) |
456 | fschmid | 310 | { |
1065 | cbradney | 311 | struct ParagraphStyle sty; |
312 | sty.Vname = ss->docParagraphStyles[xx].Vname; |
||
313 | sty.LineSpa = ss->docParagraphStyles[xx].LineSpa; |
||
314 | sty.textAlignment = ss->docParagraphStyles[xx].textAlignment; |
||
315 | sty.Indent = ss->docParagraphStyles[xx].Indent; |
||
316 | sty.First = ss->docParagraphStyles[xx].First; |
||
317 | sty.gapBefore = ss->docParagraphStyles[xx].gapBefore; |
||
318 | sty.gapAfter = ss->docParagraphStyles[xx].gapAfter; |
||
319 | sty.Font = ss->docParagraphStyles[xx].Font; |
||
320 | sty.FontSize = ss->docParagraphStyles[xx].FontSize; |
||
321 | sty.TabValues = ss->docParagraphStyles[xx].TabValues; |
||
322 | sty.Drop = ss->docParagraphStyles[xx].Drop; |
||
323 | sty.DropLin = ss->docParagraphStyles[xx].DropLin; |
||
324 | sty.FontEffect = ss->docParagraphStyles[xx].FontEffect; |
||
325 | sty.FColor = ss->docParagraphStyles[xx].FColor; |
||
326 | sty.FShade = ss->docParagraphStyles[xx].FShade; |
||
327 | sty.SColor = ss->docParagraphStyles[xx].SColor; |
||
328 | sty.SShade = ss->docParagraphStyles[xx].SShade; |
||
329 | sty.BaseAdj = ss->docParagraphStyles[xx].BaseAdj; |
||
456 | fschmid | 330 | wrkStyles->append(sty); |
331 | } |
||
332 | } |
||
333 | } |
||
334 | delete ss; |
||
335 | } |
||
336 | } |
||
337 | |||
1179 | tsoots | 338 | void ScribusDoc::lockGuides(bool isLocked) |
339 | { |
||
1180 | tsoots | 340 | if (GuideLock == isLocked) |
341 | return; |
||
1179 | tsoots | 342 | GuideLock = isLocked; |
343 | if (UndoManager::undoEnabled()) |
||
344 | { |
||
345 | QString name; |
||
346 | if (isLocked) |
||
347 | name = QObject::tr("Lock guides"); |
||
348 | else |
||
349 | name = QObject::tr("Unlock guides"); |
||
350 | SimpleState *ss = new SimpleState(name, "", &uGuideLockPixmap); |
||
351 | ss->set("GUIDE_LOCK", isLocked); |
||
352 | undoManager->action(this, ss); |
||
353 | } |
||
354 | } |
||
355 | |||
356 | void ScribusDoc::restore(UndoState* state, bool isUndo) |
||
357 | { |
||
358 | SimpleState *ss = dynamic_cast<SimpleState*>(state); |
||
359 | if (ss) |
||
360 | { |
||
361 | if (ss->contains("GUIDE_LOCK")) |
||
362 | { |
||
363 | if (isUndo) |
||
364 | GuideLock = !ss->getBool("GUIDE_LOCK"); |
||
365 | else |
||
366 | GuideLock = ss->getBool("GUIDE_LOCK"); |
||
367 | } |
||
368 | } |
||
369 | } |
||
370 | |||
371 | void ScribusDoc::setName(const QString& name) |
||
372 | { |
||
373 | DocName = name; |
||
374 | QString uname = name; |
||
375 | if (name.find("/") > -1) |
||
376 | uname = name.right(name.length() - name.findRev("/") - 1); |
||
377 | setUName(uname); // set the name for the undo object |
||
378 | } |
||
379 | |||
3 | paul | 380 | void ScribusDoc::setModified() |
381 | { |
||
382 | modified = true; |
||
383 | } |
||
384 | |||
385 | void ScribusDoc::setUnModified() |
||
386 | { |
||
387 | modified = false; |
||
388 | } |
||
389 | |||
390 | bool ScribusDoc::isModified() const |
||
391 | { |
||
392 | return modified; |
||
393 | } |
||
394 | /** Setzt die Seitenattribute */ |
||
80 | Franz | 395 | void ScribusDoc::setPage(double b, double h, double t, double l, double r, double bo, double sp, double ab, bool atf, bool fp) |
3 | paul | 396 | { |
397 | PageB = b; |
||
398 | PageH = h; |
||
399 | PageM.Top = t; |
||
400 | PageM.Left = l; |
||
401 | PageM.Right = r; |
||
402 | PageM.Bottom = bo; |
||
403 | PageSp = sp; |
||
404 | PageSpa = ab; |
||
405 | PageFP = fp; |
||
406 | PageAT = atf; |
||
407 | } |
||
408 | |||
80 | Franz | 409 | void ScribusDoc::resetPage(double t, double l, double r, double bo, bool fp) |
3 | paul | 410 | { |
411 | PageM.Top = t; |
||
412 | PageM.Left = l; |
||
413 | PageM.Right = r; |
||
414 | PageM.Bottom = bo; |
||
415 | PageFP = fp; |
||
416 | } |
||
417 | |||
220 | Franz | 418 | bool ScribusDoc::AddFont(QString name, QFont fo) |
3 | paul | 419 | { |
220 | Franz | 420 | bool ret = false; |
421 | bool error; |
||
3 | paul | 422 | FT_Face face; |
220 | Franz | 423 | error = FT_New_Face( library, (*AllFonts)[name]->Datei, 0, &face ); |
424 | if (error) |
||
425 | return ret; |
||
426 | if ((*AllFonts)[name]->ReadMetrics()) |
||
167 | Franz | 427 | { |
220 | Franz | 428 | (*AllFonts)[name]->CharWidth[13] = 0; |
249 | Franz | 429 | (*AllFonts)[name]->CharWidth[28] = 0; |
220 | Franz | 430 | (*AllFonts)[name]->CharWidth[9] = 1; |
431 | QString afnm = (*AllFonts)[name]->Datei.left((*AllFonts)[name]->Datei.length()-3); |
||
432 | QFile afm(afnm+"afm"); |
||
3 | paul | 433 | if(!(afm.exists())) |
220 | Franz | 434 | { |
435 | afm.setName(afnm+"Afm"); |
||
436 | if(!(afm.exists())) |
||
437 | afm.setName(afnm+"AFM"); |
||
438 | } |
||
439 | if (afm.exists()) |
||
440 | FT_Attach_File(face, afm.name()); |
||
441 | FFonts[name] = face; |
||
442 | UsedFonts[name] = fo; |
||
443 | ret = true; |
||
167 | Franz | 444 | } |
220 | Franz | 445 | else |
446 | FT_Done_Face( face ); |
||
447 | return ret; |
||
3 | paul | 448 | } |