Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rjsw
4 months ago
|
parent
|
context
|
favorite
| on:
HTML-in-Canvas
You can't know the size of an SVG <text> element.
skrebbel
4 months ago
[–]
why not? if you control the font and the font size then can't you have harfbuzz tell you how wide each glyph is going to be, and it'll fit precisely? (assuming the browser also uses harfbuzz for this, which it does)
rjsw
4 months ago
|
parent
[–]
Because SVG isn't defined to call into harfbuzz.
You don't control the font if the SVG fragment is embedded in HTML.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: