Comments (3)
Update: Running the same without executeVanillaTest
in a packaged .drawbot file fixes the issue. Seems like a bug then?
from drawbot.
Never use executeVanillaTest
inside an running app, this creates a new runloop and closes runloops, which is not good!!
This a made just to be able to run vanilla in terminal
from drawbot.
@typemytype Thank you for the quick response.
Perhaps I worded it poorly: yes, I know not to use executeVanillaTest
inside DrawBot.app. I am executing it as a standalone .py
file from Terminal—that’s where the bug (?) occurs.
A bit related: Frederik, do you know any resource regarding how the font vertical metrics (hhea
, OS/2
and win
) should be set up to work correctly in DrawBot (= CoreText, I presume), please?
I am using Glyphs and have been following the best practices (specifically "the Webfont strategy (2019)") but that seems to be problematic in DrawBot.
For instance, lineGap
seems to make a big difference between left (positive lineGap
) and right (lineGap = 0
) when using the code below.
fs = 340
leading = 1
txt = "Hg\nHg"
fonts = ["FontA.otf", "FontB.otf"]
fontSize(fs)
lineHeight(fs * leading)
x, y = 50, 50
for fnt in fonts:
font(fnt)
w, h = textSize(txt)
coords = x, y, w, h
textBox(txt, coords)
with savedState():
fill(None)
stroke(1, 0, 0)
rect(*coords)
x += w
Thank you!
from drawbot.
Related Issues (20)
- `textBoxCharacterBounds(align="center")` doesn’t seem to work HOT 2
- set CGContextSetAllowsFontSubpixelQuantization to False HOT 1
- font() does not support "dotted" font names, but installedFonts() does return them HOT 6
- variable font is not able to add glyphs by glyphName HOT 17
- ImageObject.opTile() error HOT 3
- ImageObject.dotScreen() not applying to shadow() HOT 2
- Black settings HOT 9
- feature request: full justification
- ImageObject.randomGenerator() yields a constant result HOT 2
- font issue or drawbot issue HOT 7
- Clean up requirements.txt and README.md, pin versions, use dependabot HOT 5
- Can't install noise using the built in pip installer, v3.130 HOT 1
- Some tests fail on macOS 14 HOT 1
- Install Python Packages causes deprecation warning under Python 3.12
- add support for lineDash phase HOT 1
- Remove defconAppKit dependency
- Arabic type settings mixed with Latin characters looks to be wrong HOT 9
- RGB color accuracy?
- Format codebase with Black
- Feature suggestion: vector format copy of rendered output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drawbot.