Sync changes from upstream repository

Co-authored-by: Andrew le Bihan <andy@mcneel.com>
Co-authored-by: Brian Gillespie <brian@mcneel.com>
Co-authored-by: Dale Lear <dalelear@mcneel.com>
Co-authored-by: Giulio Piacentino <giulio@mcneel.com>
Co-authored-by: Greg Arden <greg@mcneel.com>
Co-authored-by: Lars <lars@mcneel.com>
Co-authored-by: Lowell <lowell@mcneelcom>
Co-authored-by: Nathan Letwory <nathan@mcneel.com>
Co-authored-by: Pierre Cuvilliers <pierre@mcneel.com>
Co-authored-by: Tim Hemmelman <tim@mcneel.com>
This commit is contained in:
Bozo The Builder
2020-12-16 05:49:44 -08:00
parent 990401a8f5
commit 488533eb7a
54 changed files with 4026 additions and 898 deletions

View File

@@ -3369,10 +3369,10 @@ bool RtfComposer::Compose(
}
if(!ComposeFS())
if (!RtfComposer::ComposeFS())
temp.Format(L"}\\f%d", stylefont_key);
else
temp.Format(L"}\\f%d \\fs40", stylefont_key);
temp.Format(L"}\\f%d \\fs%d", stylefont_key, RtfComposer::TextEditorFontSize());
rtf += temp;
@@ -3416,6 +3416,20 @@ void RtfComposer::SetComposeFS(bool b)
RtfComposer::m_bComposeFS = b;
}
int RtfComposer::m_TextEditorSize = 0;
int RtfComposer::TextEditorFontSize()
{
if (0 < RtfComposer::m_TextEditorSize)
return RtfComposer::m_TextEditorSize;
else
return 18;
}
void RtfComposer::SetTextEditorFontSize(unsigned int size)
{
RtfComposer::m_TextEditorSize = size;
}
static const ON_wString Internal_PostScriptNameIfAvailable(const ON_Font& managed_font)
{
ON_wString style_fontname = managed_font.PostScriptName();
@@ -3618,10 +3632,10 @@ const ON_wString RtfComposer::ComposeAppleRTF(
rtf_string += fonttable_string;
}
if (!ComposeFS())
if (!RtfComposer::ComposeFS())
temp.Format(L"}\\f%d", deffont_key);
else
temp.Format(L"}\\f%d \\fs40", deffont_key);
temp.Format(L"}\\f%d \\fs%d", deffont_key, RtfComposer::TextEditorFontSize());
rtf_string += temp;