Skip to content

Commit d13f108

Browse files
committed
Merge branch 'nbsp' into 'master'
Non-breaking space-related fixes (#8378) Closes #8378 See merge request OpenMW/openmw!4592
2 parents 57fb334 + cd3980e commit d13f108

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

apps/openmw/mwgui/bookpage.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1343,12 +1343,13 @@ namespace MWGui
13431343
return codePoint == '\r';
13441344
}
13451345

1346+
// Normal no-break space (0x00A0) is ignored here
1347+
// because Morrowind compatibility requires us to render its glyph
13461348
static bool ucsSpace(int codePoint)
13471349
{
13481350
switch (codePoint)
13491351
{
13501352
case 0x0020: // SPACE
1351-
case 0x00A0: // NO-BREAK SPACE
13521353
case 0x1680: // OGHAM SPACE MARK
13531354
case 0x180E: // MONGOLIAN VOWEL SEPARATOR
13541355
case 0x2000: // EN QUAD
@@ -1373,12 +1374,14 @@ namespace MWGui
13731374
}
13741375
}
13751376

1377+
// No-break spaces (0x00A0, 0x202F, 0xFEFF - normal, narrow, zero width)
1378+
// are ignored here for obvious reasons
1379+
// Figure space (0x2007) is not a breaking space either
13761380
static bool ucsBreakingSpace(int codePoint)
13771381
{
13781382
switch (codePoint)
13791383
{
13801384
case 0x0020: // SPACE
1381-
// case 0x00A0: // NO-BREAK SPACE
13821385
case 0x1680: // OGHAM SPACE MARK
13831386
case 0x180E: // MONGOLIAN VOWEL SEPARATOR
13841387
case 0x2000: // EN QUAD
@@ -1388,15 +1391,12 @@ namespace MWGui
13881391
case 0x2004: // THREE-PER-EM SPACE
13891392
case 0x2005: // FOUR-PER-EM SPACE
13901393
case 0x2006: // SIX-PER-EM SPACE
1391-
case 0x2007: // FIGURE SPACE
13921394
case 0x2008: // PUNCTUATION SPACE
13931395
case 0x2009: // THIN SPACE
13941396
case 0x200A: // HAIR SPACE
13951397
case 0x200B: // ZERO WIDTH SPACE
1396-
case 0x202F: // NARROW NO-BREAK SPACE
13971398
case 0x205F: // MEDIUM MATHEMATICAL SPACE
13981399
case 0x3000: // IDEOGRAPHIC SPACE
1399-
// case 0xFEFF: // ZERO WIDTH NO-BREAK SPACE
14001400
return true;
14011401
default:
14021402
return false;

files/data/fonts/MysticCards.omwfont

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<Resource type="ResourceTrueTypeFont">
33
<Property key="Source" value="MysticCards.ttf"/>
44
<Property key="Antialias" value="false"/>
5-
<Property key="SubstituteCode" value="63"/>
5+
<Property key="SubstituteCode" value="95"/>
66
<Property key="TabWidth" value="8"/>
77
<Property key="OffsetHeight" value="0"/>
88
<Property key="Resolution" value="70"/>
99
<Codes>
1010
<Code range="33 126"/>
11-
<Code range="161"/>
11+
<Code range="160 161"/>
1212
<Code range="173"/>
1313
<Code range="175 177"/>
1414
<Code range="180"/>

files/data/fonts/MysticCards.ttf

32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)