Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Frederik Berlaen
robofont_com
Commits
aa65d66b
Commit
aa65d66b
authored
May 13, 2019
by
Gustavo Ferreira
Browse files
small edits to glyph construction example script
parent
dde76314
Pipeline
#61098147
passed with stage
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/code/building-tools/font/buildAccentedGlyphsRF3.py
View file @
aa65d66b
...
...
@@ -7,10 +7,13 @@ from glyphConstruction import ParseGlyphConstructionListFromString, GlyphConstru
# define glyph constructions
txt
=
'''
\
agrave = a + grave@center,top
?
agrave = a + grave@center,top
aacute = a + acute@center,top
'''
# filter out lines starting with '?'
txt
=
'
\n
'
.
join
([
L
for
L
in
txt
.
split
(
'
\n
'
)
if
not
L
.
startswith
(
'?'
)])
# get the actual glyph constructions from text
constructions
=
ParseGlyphConstructionListFromString
(
txt
)
...
...
@@ -24,7 +27,7 @@ for construction in constructions:
constructionGlyph
=
GlyphConstructionBuilder
(
construction
,
font
)
# get the destination glyph in the font
glyph
=
font
.
newGlyph
(
constructionGlyph
.
name
)
glyph
=
font
.
newGlyph
(
constructionGlyph
.
name
,
clear
=
True
)
# draw the construction glyph into the destination glyph
constructionGlyph
.
draw
(
glyph
.
getPen
())
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment