mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-06 18:11:57 +00:00
Merge branch 'nbsp' into 'master'
Non-breaking space-related fixes (#8378) Closes #8378 See merge request OpenMW/openmw!4592
This commit is contained in:
commit
d13f108779
@ -1343,12 +1343,13 @@ namespace MWGui
|
||||
return codePoint == '\r';
|
||||
}
|
||||
|
||||
// Normal no-break space (0x00A0) is ignored here
|
||||
// because Morrowind compatibility requires us to render its glyph
|
||||
static bool ucsSpace(int codePoint)
|
||||
{
|
||||
switch (codePoint)
|
||||
{
|
||||
case 0x0020: // SPACE
|
||||
case 0x00A0: // NO-BREAK SPACE
|
||||
case 0x1680: // OGHAM SPACE MARK
|
||||
case 0x180E: // MONGOLIAN VOWEL SEPARATOR
|
||||
case 0x2000: // EN QUAD
|
||||
@ -1373,12 +1374,14 @@ namespace MWGui
|
||||
}
|
||||
}
|
||||
|
||||
// No-break spaces (0x00A0, 0x202F, 0xFEFF - normal, narrow, zero width)
|
||||
// are ignored here for obvious reasons
|
||||
// Figure space (0x2007) is not a breaking space either
|
||||
static bool ucsBreakingSpace(int codePoint)
|
||||
{
|
||||
switch (codePoint)
|
||||
{
|
||||
case 0x0020: // SPACE
|
||||
// case 0x00A0: // NO-BREAK SPACE
|
||||
case 0x1680: // OGHAM SPACE MARK
|
||||
case 0x180E: // MONGOLIAN VOWEL SEPARATOR
|
||||
case 0x2000: // EN QUAD
|
||||
@ -1388,15 +1391,12 @@ namespace MWGui
|
||||
case 0x2004: // THREE-PER-EM SPACE
|
||||
case 0x2005: // FOUR-PER-EM SPACE
|
||||
case 0x2006: // SIX-PER-EM SPACE
|
||||
case 0x2007: // FIGURE SPACE
|
||||
case 0x2008: // PUNCTUATION SPACE
|
||||
case 0x2009: // THIN SPACE
|
||||
case 0x200A: // HAIR SPACE
|
||||
case 0x200B: // ZERO WIDTH SPACE
|
||||
case 0x202F: // NARROW NO-BREAK SPACE
|
||||
case 0x205F: // MEDIUM MATHEMATICAL SPACE
|
||||
case 0x3000: // IDEOGRAPHIC SPACE
|
||||
// case 0xFEFF: // ZERO WIDTH NO-BREAK SPACE
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
@ -2,13 +2,13 @@
|
||||
<Resource type="ResourceTrueTypeFont">
|
||||
<Property key="Source" value="MysticCards.ttf"/>
|
||||
<Property key="Antialias" value="false"/>
|
||||
<Property key="SubstituteCode" value="63"/>
|
||||
<Property key="SubstituteCode" value="95"/>
|
||||
<Property key="TabWidth" value="8"/>
|
||||
<Property key="OffsetHeight" value="0"/>
|
||||
<Property key="Resolution" value="70"/>
|
||||
<Codes>
|
||||
<Code range="33 126"/>
|
||||
<Code range="161"/>
|
||||
<Code range="160 161"/>
|
||||
<Code range="173"/>
|
||||
<Code range="175 177"/>
|
||||
<Code range="180"/>
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user