Proper support for using Source Code and OCR-A fonts
parent
206ae1be96
commit
572456971b
|
|
@ -852,6 +852,10 @@ bool LLFontGL::loadDefaultFonts()
|
|||
succ &= (NULL != getFontSansSerifBold());
|
||||
succ &= (NULL != getFontMonospace());
|
||||
succ &= (NULL != getFontExtChar());
|
||||
// <FS:CR> Advanced script editor
|
||||
succ &= (NULL != getFontScripting());
|
||||
succ &= (NULL != getFontOCRA());
|
||||
// </FS:CR>
|
||||
return succ;
|
||||
}
|
||||
|
||||
|
|
@ -1036,6 +1040,22 @@ LLFontGL* LLFontGL::getFontSansSerifBold()
|
|||
return fontp;
|
||||
}
|
||||
|
||||
// <FS:CR> Advanced Script Editor
|
||||
//static
|
||||
LLFontGL* LLFontGL::getFontScripting()
|
||||
{
|
||||
static LLFontGL* fontp = getFont(LLFontDescriptor("Scripting","Monospace",0));
|
||||
return fontp;
|
||||
}
|
||||
|
||||
//static
|
||||
LLFontGL* LLFontGL::getFontOCRA()
|
||||
{
|
||||
static LLFontGL* fontp = getFont(LLFontDescriptor("OCRA","Monospace",0));
|
||||
return fontp;
|
||||
}
|
||||
// </FS:CR>
|
||||
|
||||
//static
|
||||
LLFontGL* LLFontGL::getFontExtChar()
|
||||
{
|
||||
|
|
@ -1064,12 +1084,21 @@ LLFontGL* LLFontGL::getFontByName(const std::string& name)
|
|||
{
|
||||
return getFontSansSerifBig();
|
||||
}
|
||||
else if (name == "SMALL" || name == "OCRA")
|
||||
// <FS:CR> Advanced script editor
|
||||
//else if (name == "SMALL" || name == "OCRA")
|
||||
else if (name == "SMALL")
|
||||
// </FS:CR>
|
||||
{
|
||||
// *BUG: Should this be "MONOSPACE"? Do we use "OCRA" anymore?
|
||||
// *BUG: Should this be "MONOSPACE"?
|
||||
// Does "SMALL" mean "SERIF"?
|
||||
return getFontMonospace();
|
||||
}
|
||||
// <FS:CR> Advanced script editor
|
||||
else if (name == "OCRA")
|
||||
{
|
||||
return getFontOCRA();
|
||||
}
|
||||
// </FS:CR>
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -179,6 +179,10 @@ public:
|
|||
static LLFontGL* getFontSansSerifBig();
|
||||
static LLFontGL* getFontSansSerifHuge();
|
||||
static LLFontGL* getFontSansSerifBold();
|
||||
// <FS:CR> Advanced script editor
|
||||
static LLFontGL* getFontScripting();
|
||||
static LLFontGL* getFontOCRA();
|
||||
// </FS:CR>
|
||||
static LLFontGL* getFontExtChar();
|
||||
static LLFontGL* getFont(const LLFontDescriptor& desc);
|
||||
// Use with legacy names like "SANSSERIF_SMALL" or "OCRA"
|
||||
|
|
|
|||
|
|
@ -62,11 +62,16 @@
|
|||
<file>DejaVuSansMono.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
<file>DejaVuSans.ttf</file>
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>DejaVuSans.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,11 +62,16 @@
|
|||
<file>DroidSansMono.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
<file>DroidSans.ttf</file>
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>DroidSans.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,13 +62,18 @@
|
|||
<file>MobiSansMono.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
comment="Name of DejaVu font">
|
||||
<file>opendyslexic.ttf</file>
|
||||
</font>
|
||||
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>opendyslexic.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,10 +62,15 @@
|
|||
<file>LiberationMono-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>DejaVuSans.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,10 +62,15 @@
|
|||
<file>MobiSansMono.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>MobiSans.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,11 +62,16 @@
|
|||
<file>MobiSansMono.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>SourceCodePro-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
<file>Roboto-Regular.ttf</file>
|
||||
|
|
@ -143,7 +148,7 @@
|
|||
<file>Roboto-Regular.ttf</file>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,10 +62,15 @@
|
|||
<file>UbuntuMono-R.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="Script"
|
||||
<font name="Scripting"
|
||||
comment="Name of an optional font used for the script editor">
|
||||
<file>UbuntuMono-R.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="OCRA"
|
||||
comment="OCRA machine character recognition used in script editor compile errors">
|
||||
<file>ocra.ttf</file>
|
||||
</font>
|
||||
|
||||
<font name="DejaVu"
|
||||
comment="Name of DejaVu font">
|
||||
|
|
@ -137,7 +142,7 @@
|
|||
</os>
|
||||
</font>
|
||||
|
||||
<font_size name="Script"
|
||||
<font_size name="Scripting"
|
||||
comment="Size of script editor font (points, or 1/72 of an inch)"
|
||||
size="9.6"
|
||||
/>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -318,7 +318,7 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
@ -378,7 +378,7 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -318,8 +318,8 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font.size="Script"
|
||||
font="Scripting"
|
||||
font.size="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
|
|||
|
|
@ -342,7 +342,8 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font="Scripting"
|
||||
font.size="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
@ -378,7 +379,8 @@
|
|||
type="string"
|
||||
length="1"
|
||||
follows="left|top|right|bottom"
|
||||
font="Script"
|
||||
font="Scripting"
|
||||
font.size="Scripting"
|
||||
height="376"
|
||||
ignore_tab="false"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue