Open MrBrezina opened 4 years ago
fs = db.FormattedString() fs.font("Handjet-Regular") fs.fontSize(350) fs.fontVariations(wght=300) fs.appendGlyph("A") text(fs, (100, 100))
Draws a .notdef glyph from another font (Lucida?). Everything works as expected if I leave out this line fs.fontVariations(wght=300).
.notdef
fs.fontVariations(wght=300)
In case it is an issue in the Handjet font, let me know, please.
Another related, unexpected behaviour:
I thought I could set up the FormattedString like this:
fs = db.FormattedString("", font="Handjet-Regular", fontSize=350, …) fs.append("xyz")
But that does not work, neither with append() nor with appendGlyph(). The font and fontSize settings are ignored for the text “xyz“. I would expect them to get carried on.
append()
appendGlyph()
font
fontSize
also read https://forum.drawbot.com/topic/316/appending-a-glyph-to-a-formattedstring-does-not-work-well-when-fontvariations-are-set
an example with Skia
fs = FormattedString() fs.font("Skia") fs.fontSize(350) fs.fontVariations(wght=0.93) fs += "A" fs.appendGlyph("A") text(fs, (100, 100))
Draws a
.notdef
glyph from another font (Lucida?). Everything works as expected if I leave out this linefs.fontVariations(wght=300)
.In case it is an issue in the Handjet font, let me know, please.
Another related, unexpected behaviour:
I thought I could set up the FormattedString like this:
But that does not work, neither with
append()
nor withappendGlyph()
. Thefont
andfontSize
settings are ignored for the text “xyz“. I would expect them to get carried on.