Skip to content

Commit

Permalink
Adding single quote as empty character in block font
Browse files Browse the repository at this point in the history
Updating the preview at the same time with better code for GET data and different texts to preview in the selected font
NOTE that the single quote will break the line as it is not considered a character, this will have to be fixed in the future
  • Loading branch information
sandorex committed Jan 16, 2022
1 parent 192e0a3 commit 8b98051
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 161 deletions.
16 changes: 11 additions & 5 deletions block/block.sfd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OS2Version: 0
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1641441649
ModificationTime: 1642232737
ModificationTime: 1642306463
PfmFamily: 17
TTFWeight: 400
TTFWidth: 5
Expand Down Expand Up @@ -75,7 +75,7 @@ FitToEm: 0
BeginPrivate: 0
EndPrivate
TeXData: 1 0 0 262144 131072 87381 838656 1048576 87381 783286 444596 497025 792723 393216 433062 380633 303038 157286 324010 404750 52429 2506097 1059062 262144
BeginChars: 266 79
BeginChars: 266 80

StartChar: A
Encoding: 65 65 0
Expand Down Expand Up @@ -1083,7 +1083,6 @@ EndChar
StartChar: glyph77
Encoding: 40 40 77
Width: 384
VWidth: 0
UnlinkRmOvrlpSave: 1
Flags: HW
LayerCount: 2
Expand All @@ -1096,13 +1095,11 @@ Refer: 60 -1 N 1 0 0 1 128 0 2
Refer: 59 -1 N 1 0 0 1 128 0 2
Refer: 58 -1 N 1 0 0 1 128 0 2
Refer: 57 -1 N 1 0 0 1 128 0 2
Refer: 56 -1 N 1 0 0 1 128 0 2
EndChar

StartChar: glyph78
Encoding: 41 41 78
Width: 384
VWidth: 0
UnlinkRmOvrlpSave: 1
Flags: HW
LayerCount: 2
Expand All @@ -1117,5 +1114,14 @@ Refer: 58 -1 N 1 0 0 1 128 0 2
Refer: 57 -1 N 1 0 0 1 128 0 2
Refer: 56 -1 N 1 0 0 1 128 0 2
EndChar

StartChar: glyph79
Encoding: 39 39 79
Width: 0
VWidth: 0
UnlinkRmOvrlpSave: 1
Flags: HW
LayerCount: 2
EndChar
EndChars
EndSplineFont
21 changes: 11 additions & 10 deletions block/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,23 @@ def new_char(ch=None, outline=None, *, name=None, width=CHAR_WIDTH, references=N
new_char(name=ch, outline=os.path.join(path, filename))

### GLYPHS ###
new_char('\'', width=0)
new_char(' ', width=CHAR_WIDTH*2)
new_char(',', width=CHAR_WIDTH * 2)
new_char('.', width=CHAR_WIDTH * 4)
new_char('"', width=CHAR_WIDTH*3, references=[
('block-u1', psMat.translate(CHAR_WIDTH, 0)),
('block-d3', psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_U1, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_D3, psMat.translate(CHAR_WIDTH, 0)),
])
new_char('!', width=CHAR_WIDTH*3, references=[
('block-u1', psMat.translate(CHAR_WIDTH, 0)),
('block-u2', psMat.translate(CHAR_WIDTH, 0)),
('block-u3', psMat.translate(CHAR_WIDTH, 0)),
('block-c1', psMat.translate(CHAR_WIDTH, 0)),
('block-c2', psMat.translate(CHAR_WIDTH, 0)),
('block-d1', psMat.translate(CHAR_WIDTH, 0)),

('block-d3', psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_U1, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_U2, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_U3, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_C1, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_C2, psMat.translate(CHAR_WIDTH, 0)),
(BLOCK_D1, psMat.translate(CHAR_WIDTH, 0)),

(BLOCK_D3, psMat.translate(CHAR_WIDTH, 0)),
])
new_char('(', width=CHAR_WIDTH*3, references=[
(BLOCK_1, psMat.translate(CHAR_WIDTH, 0)),
Expand Down
Loading

0 comments on commit 8b98051

Please sign in to comment.