- //
- //now the hard part - convert the atsu font to a wx font
- //
-
- //point size - fixed, but straight conversion, I think
- theFont.SetPointSize(fontsize >> 16);
-
- //font name - first get length, then allocate/copy/deallocate name buffer
- FontNameCode theNameCode;
- FontPlatformCode thePlatformCode;
- FontScriptCode theScriptCode;
- FontLanguageCode theLanguageCode;
- //the above have types in SFNTTypes.h
-
- ByteCount theActualLength;
- ItemCount numFontFaces;
-
-/*
- ATSUCountFontNames(fontid,
- &numFontFaces);
-
- ATSUGetIndFontName(fontid,
- numFontFaces-1, //first font in index array
- 0, //need to get length first
- NULL, //nothin'
- &theActualLength,
- &theNameCode,
- &thePlatformCode,
- &theScriptCode,
- &theLanguageCode);
-
- Ptr szBuffer = NewPtr(theActualLength);
- ATSUGetIndFontName(fontid,
- numFontFaces-1, //first font in index array
- theActualLength,
- szBuffer,
- &theActualLength,
- &theNameCode,
- &thePlatformCode,
- &theScriptCode,
- &theLanguageCode);
-
- //its unicode - convert it to wx's char value and put it in there
- theFont.SetFaceName(wxConvLocal.cMB2WX((char*)szBuffer));
- DisposePtr(szBuffer);
-*/
-