mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-18 11:44:26 +08:00
Fix apple
This commit is contained in:
parent
4c416bc747
commit
5ce91555f3
@ -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…
x
Reference in New Issue
Block a user