Extending wxFont API & OSX Core Text Implementation (#877)
* Switch to pure Core Text Implementation, Start extended Font API * mac fixes * First msw implementation * Fixing paste error * fixing typo * Rearranging lines to former fallthrough order * Blind fixes for covering new abstract methods * Blind gtk implementations * Fixing according to travis .. * Removing method defined in base * formatting adaptions * Extending the schema definition for new weights * fixing typo, using wxRound, other fixes according to comments * changes according to suggestions * fixing init order, before the init of m_info was overridden by Init() * redo * redo * redo * Cleanup Removing obsolete code snippets, proper traces for font names * Moving common code Only the Get/SetNumericWeight calls should now be implemented in the native part, the ‚old‘ Get/SetWeight are common code and use the numeric counterparts. * Updating docs * commit wa missing changes.txt * Doc fixes * Full stops added
This commit is contained in:
@@ -834,10 +834,10 @@ wxMacCoreGraphicsFontData::wxMacCoreGraphicsFontData(wxGraphicsRenderer* rendere
|
||||
m_underlined = font.GetUnderlined();
|
||||
m_strikethrough = font.GetStrikethrough();
|
||||
|
||||
m_ctFont.reset( wxCFRetain( font.OSXGetCTFont() ) );
|
||||
m_ctFontAttributes.reset( wxCFRetain( font.OSXGetCTFontAttributes() ) );
|
||||
m_ctFont = wxCFRetain(font.OSXGetCTFont());
|
||||
m_ctFontAttributes = wxCFRetain(font.OSXGetCTFontAttributes());
|
||||
#if wxOSX_USE_IPHONE
|
||||
m_uiFont.reset( wxCFRetain( font.OSXGetUIFont() ) );
|
||||
m_uiFont = font.OSXGetUIFont();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2892,13 +2892,10 @@ wxMacCoreGraphicsRenderer::CreateFont(double sizeInPixels,
|
||||
int flags,
|
||||
const wxColour& col)
|
||||
{
|
||||
// This implementation is not ideal as we don't support fractional font
|
||||
// sizes right now, but it's the simplest one.
|
||||
//
|
||||
// Notice that under Mac we always use 72 DPI so the font size in pixels is
|
||||
// the same as the font size in points and we can pass it directly to wxFont
|
||||
// ctor.
|
||||
wxFont font(wxRound(sizeInPixels),
|
||||
wxFont font((float)sizeInPixels,
|
||||
wxFONTFAMILY_DEFAULT,
|
||||
flags & wxFONTFLAG_ITALIC ? wxFONTSTYLE_ITALIC
|
||||
: wxFONTSTYLE_NORMAL,
|
||||
|
Reference in New Issue
Block a user