Comments (7)
Thanks for submitting. I need to either decide to come up with a strategy for predicting when this would occur (any diacritic above a capital letter) or develop a way to understand the real extent of a rendered piece of text. But I'll fix it!
from typeslab.
Jip. +1
from typeslab.
Same thing with spanish accentuated chars.
from typeslab.
Beware that some characters have diacritics below. Here are some Turkish chars.
I guess, you should measure character heights. This may be a good start: http://stackoverflow.com/questions/1134586/how-can-you-find-the-height-of-text-on-an-html-canvas
from typeslab.
Fixed as of #7
Thanks for letting me know about this!
from typeslab.
Jey, much better. I just found some small special case: For those characters there is no font-combination where all letters are included and the ť hangs out.
from typeslab.
Yeah, that's a different bug - canvas has a measureText
function which is supposed to give me a real width of the rendered text, but it doesn't. I might use the same logic for depth checking as I do for width-checking, shouldn't be too hard, but I won't have time to fix it for a while. Anyone feel like throwing a PR at me? The lines in question are here: https://github.com/geelen/typeslab/blob/master/src/lib/models/line-metrics.js#L15-L25
I'd love to avoid calculating the depth twice, but I don't see how. In the use-case above, the line doesn't need to be resized, just shifted left. Maybe that case is easier to deal with...
from typeslab.
Related Issues (13)
- Relaxing jsx restrictions HOT 1
- Export as square for Instagram
- Error running project HOT 1
- Error after fresh installation HOT 1
- Unable to Start Server HOT 1
- Love this! Could you add higher resolution? Or SVG? HOT 2
- Error while building the project HOT 8
- Issues with Emoji. HOT 2
- Option to add image HOT 3
- Export as Vector? HOT 2
- Print options?
- Provide accessible text HOT 2
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 typeslab.