ttfonts.cpp File Reference

(r1785/r1282)

#include "camtypes.h"
#include "ttfonts.h"
#include "fontman.h"
#include "textfuns.h"
#include "oilpanse.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

 DECLARE_SOURCE ("$Revision: 1282 $")
INT32 APIENTRY TTFontMan_CallBackCacheNamedFont (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM lParam)
 The call back function providing all font data.
INT32 APIENTRY TTFontMan_CallBackValidateFont (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM lParam)
 The call back function providing all font data.
INT32 APIENTRY TTFontMan_CallBackDispatchFont (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM lParam)
 The call back function providing all font data.
INT32 APIENTRY TTFontMan_CallBackFindClosestFont (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM lParam)
 The call back function for finding the closest font.


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 115 of file ttfonts.cpp.


Function Documentation

DECLARE_SOURCE "$Revision: 1282 $"   ) 
 

INT32 APIENTRY TTFontMan_CallBackCacheNamedFont ENUMLOGFONT FAR *  lpelf,
NEWTEXTMETRIC FAR *  lpntm,
INT32  FontType,
LPARAM  lParam
 

The call back function providing all font data.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/9/95

Definition at line 465 of file ttfonts.cpp.

00471 {
00472     if (FontType & TRUETYPE_FONTTYPE)
00473     {
00474         // find the font name
00475         String_64 FontName(lpelf->elfLogFont.lfFaceName);
00476 
00477         if (lParam==NULL || (_tcsncicmp(FontName, *((String_64 * )lParam), 64) == 0))
00478         {
00479             FontManager* pFontMan = GetApplication()->GetFontManager();
00480             pFontMan->SetTempFont(FC_TRUETYPE, &FontName, lpelf);
00481             return FALSE;
00482         }
00483     }
00484     return TRUE;
00485 }

INT32 APIENTRY TTFontMan_CallBackDispatchFont ENUMLOGFONT FAR *  lpelf,
NEWTEXTMETRIC FAR *  lpntm,
INT32  FontType,
LPARAM  lParam
 

The call back function providing all font data.

INT32 APIENTRY TTFontMan_CallBackDispatchFont( ENUMLOGFONT FAR* lpelf, // address of logical-font data NEWTEXTMETRIC FAR* lpntm, // address of physical-font data INT32 FontType, // type of font LPARAM lParam // address of application-defined data

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/9/95

Definition at line 535 of file ttfonts.cpp.

00541 {
00542     UNREFERENCED_PARAMETER (lpntm);
00543 
00544     if ((FontType & TRUETYPE_FONTTYPE) && lpelf->elfLogFont.lfFaceName[0] != TEXT('@'))
00545     {
00546         return ((OILEnumFonts*) lParam)->NewFont(FC_TRUETYPE, lpelf);
00547     }
00548 
00549     return TRUE;
00550 }

INT32 APIENTRY TTFontMan_CallBackFindClosestFont ENUMLOGFONT FAR *  lpelf,
NEWTEXTMETRIC FAR *  lpntm,
INT32  FontType,
LPARAM  lParam
 

The call back function for finding the closest font.

INT32 APIENTRY TTFontMan_CallBackFindClosestFont( ENUMLOGFONT FAR* lpelf, // address of logical-font data NEWTEXTMETRIC FAR* lpntm, // address of physical-font data INT32 FontType, // type of font LPARAM lParam // address of application-defined data

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/08/96

Definition at line 566 of file ttfonts.cpp.

00572 {
00573     UNREFERENCED_PARAMETER (lpntm);
00574 
00575     if (FontType & TRUETYPE_FONTTYPE)
00576     {
00577         // find the font name
00578         String_64 FontName(lpelf->elfLogFont.lfFaceName);
00579 
00580         FontManager* pFontMan = GetApplication()->GetFontManager();
00581         return pFontMan->FindClosestFontFullTry(FC_TRUETYPE, &FontName, lpelf);
00582     }
00583     
00584     return TRUE;
00585 }

INT32 APIENTRY TTFontMan_CallBackValidateFont ENUMLOGFONT FAR *  lpelf,
NEWTEXTMETRIC FAR *  lpntm,
INT32  FontType,
LPARAM  lParam
 

The call back function providing all font data.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/9/95

Definition at line 501 of file ttfonts.cpp.

00507 {
00508     UNREFERENCED_PARAMETER (lpntm);
00509 
00510     if (FontType & TRUETYPE_FONTTYPE)
00511     {
00512         // find the font name
00513         String_64 FontName(lpelf->elfLogFont.lfFaceName);
00514 
00515         FontManager* pFontMan = GetApplication()->GetFontManager();
00516         pFontMan->ValidateItem(FC_TRUETYPE, &FontName, lpelf);
00517     }
00518     return TRUE;
00519 }


Generated on Sat Nov 10 03:49:36 2007 for Camelot by  doxygen 1.4.4