mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-06 06:56:23 +08:00
Sync changes from upstream repository
This commit is contained in:
@@ -3369,10 +3369,13 @@ bool RtfComposer::Compose(
|
||||
|
||||
}
|
||||
|
||||
temp.Format(L"}\\f%d \\fs40", stylefont_key);
|
||||
if(!ComposeFS())
|
||||
temp.Format(L"}\\f%d", stylefont_key);
|
||||
else
|
||||
temp.Format(L"}\\f%d \\fs40", stylefont_key);
|
||||
|
||||
rtf += temp;
|
||||
|
||||
//rtf += L"}\\fs40";
|
||||
if (style_bold)
|
||||
rtf += L"\\b";
|
||||
if (style_italic)
|
||||
@@ -3402,6 +3405,17 @@ void RtfComposer::SetRecomposeRTF(bool b)
|
||||
RtfComposer::m_bComposeRTF = b;
|
||||
}
|
||||
|
||||
// Turns on or off adding \FS40 to composed strings
|
||||
bool RtfComposer::m_bComposeFS = true;
|
||||
bool RtfComposer::ComposeFS()
|
||||
{
|
||||
return RtfComposer::m_bComposeFS;
|
||||
}
|
||||
void RtfComposer::SetComposeFS(bool b)
|
||||
{
|
||||
RtfComposer::m_bComposeFS = b;
|
||||
}
|
||||
|
||||
static const ON_wString Internal_PostScriptNameIfAvailable(const ON_Font& managed_font)
|
||||
{
|
||||
ON_wString style_fontname = managed_font.PostScriptName();
|
||||
@@ -3604,9 +3618,12 @@ const ON_wString RtfComposer::ComposeAppleRTF(
|
||||
rtf_string += fonttable_string;
|
||||
}
|
||||
|
||||
temp.Format(L"}\\f%d \\fs40", deffont_key);
|
||||
if (!ComposeFS())
|
||||
temp.Format(L"}\\f%d", deffont_key);
|
||||
else
|
||||
temp.Format(L"}\\f%d \\fs40", deffont_key);
|
||||
|
||||
rtf_string += temp;
|
||||
//rtf_string += L"}\\fs40";
|
||||
|
||||
rtf_string += run_strings;
|
||||
rtf_string += L"}";
|
||||
|
||||
Reference in New Issue
Block a user