fix remaining bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29413 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,13 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
Fixed fontsize;
|
Fixed fontsize;
|
||||||
RGBColor fontcolor;
|
RGBColor fontcolor;
|
||||||
FMFontStyle fontstyle;
|
FMFontStyle fontstyle;
|
||||||
|
FMFontFamily fontfamily;
|
||||||
|
|
||||||
|
status = GetEventParameter (event, kEventParamFMFontFamily,
|
||||||
|
typeFMFontFamily, NULL,
|
||||||
|
sizeof (FMFontFamily),
|
||||||
|
NULL, &(fontfamily));
|
||||||
|
check_noerr (status);
|
||||||
|
|
||||||
status = GetEventParameter (event, kEventParamFMFontStyle,
|
status = GetEventParameter (event, kEventParamFMFontStyle,
|
||||||
typeFMFontStyle, NULL,
|
typeFMFontStyle, NULL,
|
||||||
@@ -93,8 +100,14 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
//the above have types in SFNTTypes.h
|
//the above have types in SFNTTypes.h
|
||||||
|
|
||||||
ByteCount theActualLength;
|
ByteCount theActualLength;
|
||||||
|
ItemCount numFontFaces;
|
||||||
|
|
||||||
|
/*
|
||||||
|
ATSUCountFontNames(fontid,
|
||||||
|
&numFontFaces);
|
||||||
|
|
||||||
ATSUGetIndFontName(fontid,
|
ATSUGetIndFontName(fontid,
|
||||||
0, //first font in index array
|
numFontFaces-1, //first font in index array
|
||||||
0, //need to get length first
|
0, //need to get length first
|
||||||
NULL, //nothin'
|
NULL, //nothin'
|
||||||
&theActualLength,
|
&theActualLength,
|
||||||
@@ -105,7 +118,7 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
|
|
||||||
Ptr szBuffer = NewPtr(theActualLength);
|
Ptr szBuffer = NewPtr(theActualLength);
|
||||||
ATSUGetIndFontName(fontid,
|
ATSUGetIndFontName(fontid,
|
||||||
0, //first font in index array
|
numFontFaces-1, //first font in index array
|
||||||
theActualLength,
|
theActualLength,
|
||||||
szBuffer,
|
szBuffer,
|
||||||
&theActualLength,
|
&theActualLength,
|
||||||
@@ -117,6 +130,11 @@ pascal OSStatus wxFontDialogEventHandler( EventHandlerCallRef inHandlerCallRef,
|
|||||||
//its unicode - convert it to wx's char value and put it in there
|
//its unicode - convert it to wx's char value and put it in there
|
||||||
theFont.SetFaceName(wxConvLocal.cMB2WX((char*)szBuffer));
|
theFont.SetFaceName(wxConvLocal.cMB2WX((char*)szBuffer));
|
||||||
DisposePtr(szBuffer);
|
DisposePtr(szBuffer);
|
||||||
|
*/
|
||||||
|
|
||||||
|
Str255 theFontName;
|
||||||
|
GetFontName(fontfamily, theFontName);
|
||||||
|
theFont.SetFaceName(wxMacMakeStringFromPascal(theFontName));
|
||||||
|
|
||||||
//TODOTODO: Get font family - mayby by the script code?
|
//TODOTODO: Get font family - mayby by the script code?
|
||||||
theFont.SetFamily(wxDEFAULT);
|
theFont.SetFamily(wxDEFAULT);
|
||||||
|
Reference in New Issue
Block a user