Added font family to wxTextAttr
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,6 +66,7 @@ inline void wxCheckSetFont(wxDC& dc, const wxFont& font)
|
||||
font1.GetStyle() == font.GetStyle() &&
|
||||
font1.GetWeight() == font.GetWeight() &&
|
||||
font1.GetUnderlined() == font.GetUnderlined() &&
|
||||
font1.GetFamily() == font.GetFamily() &&
|
||||
font1.GetFaceName() == font.GetFaceName())
|
||||
return;
|
||||
}
|
||||
@@ -1988,6 +1989,23 @@ bool wxRichTextParagraphLayoutBox::CollectStyle(wxTextAttr& currentStyle, const
|
||||
}
|
||||
}
|
||||
|
||||
if (style.HasFontFamily() && !wxHasStyle(multipleStyleAttributes|absentStyleAttributes, wxTEXT_ATTR_FONT_FAMILY))
|
||||
{
|
||||
if (currentStyle.HasFontFamily())
|
||||
{
|
||||
if (currentStyle.GetFontFamily() != style.GetFontFamily())
|
||||
{
|
||||
// Clash of style - mark as such
|
||||
multipleStyleAttributes |= wxTEXT_ATTR_FONT_FAMILY;
|
||||
currentStyle.SetFlags(currentStyle.GetFlags() & ~wxTEXT_ATTR_FONT_FAMILY);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentStyle.SetFontFamily(style.GetFontFamily());
|
||||
}
|
||||
}
|
||||
|
||||
if (style.HasFontWeight() && !wxHasStyle(multipleStyleAttributes|absentStyleAttributes, wxTEXT_ATTR_FONT_WEIGHT))
|
||||
{
|
||||
if (currentStyle.HasFontWeight())
|
||||
|
Reference in New Issue
Block a user