Skip to content

Commit 6ce70f6

Browse files
committed
FontnameParser: Fix fsSelection for --has-no-italic
[why] For fonts that have no Italic but an Oblique - i.e. when Oblique shall replace the Italic role in RIBBI font grouping (classic group of 4) - that grouping fails. This affects DejaVu on Putty. [how] For RIBBI grouping only the classic bits are considered. That means that for fonts that have Oblique instead of Italic (and not additionally) we need to set the ITALIC bit and the OBLIQUE bit. This has been overlooked. Cite from the specs: > This bit, unlike the ITALIC bit (bit 0), is not related to style-linking > in applications that assume a four-member font-family model comprised > of regular, italic, bold and bold italic. It may be set or unset > independently of the ITALIC bit. In most cases, if OBLIQUE is set, then > ITALIC will also be set, though this is not required. [note] Also increase font-patcher version. Fixes: #1249 Reported-by: Huifeng Shen <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
1 parent 0fc2372 commit 6ce70f6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bin/scripts/name_parser/FontnameParser.py

+3
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ def fs_selection(self, fs):
252252
# Ignore Italic if we have Oblique
253253
if 'Oblique' in self.weight_token:
254254
b |= OBLIQUE
255+
if not self.rename_oblique:
256+
# If we have no dedicated italic, than oblique = italic
257+
b |= ITALIC
255258
elif 'Italic' in self.style_token:
256259
b |= ITALIC
257260
# Regular is just the basic weight

font-patcher

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import absolute_import, print_function, unicode_literals
77

88
# Change the script version when you edit this script:
9-
script_version = "4.3.1"
9+
script_version = "4.3.2"
1010

1111
version = "3.0.1"
1212
projectName = "Nerd Fonts"

0 commit comments

Comments
 (0)