Fix apple
This commit is contained in:
parent
4c416bc747
commit
5ce91555f3
1 changed files with 4 additions and 1 deletions
|
@ -17,6 +17,9 @@
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/fontdlg.h>
|
#include <wx/fontdlg.h>
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <CoreText/CTFont.h>
|
||||||
|
#endif // apple
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
class WxFontUtils
|
class WxFontUtils
|
||||||
|
@ -619,7 +622,7 @@ std::optional<Emboss::Font> WxFontUtils::load_font(const wxFont &font)
|
||||||
return {};
|
return {};
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
const wxNativeFontInfo *info = font.GetNativeFontInfo();
|
const wxNativeFontInfo *info = font.GetNativeFontInfo();
|
||||||
CTFontDescriptorRef descriptor = info3->GetCTFontDescriptor();
|
CTFontDescriptorRef descriptor = info->GetCTFontDescriptor();
|
||||||
CFDictionaryRef attribs = CTFontDescriptorCopyAttributes(descriptor);
|
CFDictionaryRef attribs = CTFontDescriptorCopyAttributes(descriptor);
|
||||||
CFStringRef url = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontURLAttribute);
|
CFStringRef url = (CFStringRef)CTFontDescriptorCopyAttribute(descriptor, kCTFontURLAttribute);
|
||||||
std::string str(CFStringGetCStringPtr(CFURLGetString(anUrl),kCFStringEncodingUTF8));
|
std::string str(CFStringGetCStringPtr(CFURLGetString(anUrl),kCFStringEncodingUTF8));
|
||||||
|
|
Loading…
Reference in a new issue