Comments (12)
How do you get first point off curve for a cubic Bézier considering the explicit form? You mean given first point doesn't correspond to t=0, right?
from freetype-py.
A while ago there was a discussion on the Opentype list about this sort of thing. It is legal for a curve to consist of entirely off-curve points. Say 4, at the corner of a square. The rasterizer interpolates them. That was the answer from Microsoft people.
So an implied on-curve point is between the first and the last.
I think it can be even more extreme - a contour can be made from 3 off-curve points. Font designers rarely do it, that's all.
from freetype-py.
Didn't know that. Do you have a pointer to some documentation such that we can add it in the relevant example (where I'm asking to rephrase). It's not the example is not optimal but it is more a partial implementation.
from freetype-py.
from freetype-py.
But freetype outline takes care of normalizing the output, no?
See https://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html)
from freetype-py.
Ok, no it doesn't, we have to take care of point tags.
from freetype-py.
You do interpolate most of the time - just afaic, not the first point; and also always split a 3-order curve into two, with an interpolation in the middle. Difference small but for some glyph, might be visible.
from freetype-py.
So we better implement the full method.
from freetype-py.
3rd curves only on postscript fonts. 2nd order is sufficient for truetype.
from freetype-py.
I hope this is shown side by side - left interpolated 2nd order, right true-3rd order:
and again, with the control points,, which make it clearer:
These are using MinionPro-Regular.otf from adobe acrobat reader.
from freetype-py.
Hmm, my 'g' is a bit off in the horizonal direction for the MinionPro-Regular.otf
from freetype-py.
These are the g's from MinionPro-Regular.otf and MinionPro-It.otf, correctly aligned in the horizontal. from
the top of #55 .
from freetype-py.
Related Issues (20)
- [Question] How to decode Face.postscript_name? HOT 26
- About emoji from font file error HOT 9
- libfreetype.so when system == Emscripten HOT 11
- Documentation for get_first_char HOT 3
- FT_Exception: (cannot open resource) HOT 21
- Two-factor identification on PyPi HOT 5
- get_cbox() raise "invalid argument" error HOT 3
- Wrong horizontal character positioning in hello world examples HOT 9
- New release with pyinstaller fix HOT 5
- feature request: expose FreeType's COLRv1 API HOT 6
- Please publish .tar.gz sdist archives
- on exit, freetype/__init__.py", line 1233, in __del__ TypeError: 'NoneType' object is not callable HOT 10
- `segfault` with version `2.4.0` HOT 10
- possible memory leaks and issues during finalizer HOT 1
- `load_char` failed for custom fonts with right input HOT 28
- Pyinstaller cannot import module HOT 5
- AttributeError: module 'freetype' has no attribute 'Face' HOT 2
- Please provide non-bundled wheels HOT 7
- Remove the pyinstaller code if there is any more trouble
- Move freetype-py to Freetype organisation ? 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 freetype-py.