Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glyph-vector-2 svg example, bitmap inverted and also scaling wrong. #59

Open
HinTak opened this issue Apr 30, 2017 · 3 comments
Open

glyph-vector-2 svg example, bitmap inverted and also scaling wrong. #59

HinTak opened this issue Apr 30, 2017 · 3 comments

Comments

@HinTak
Copy link
Collaborator

HinTak commented Apr 30, 2017

glyph-vector-2

I have rewritten the vector outline sample ( output at
#55 (comment) ) and is on to the composite bitmap +output sample in vector-2, and found it to be wrong in a few ways:

  • the bitmap in the background is inverted. It is actually a g, but I thought it was a stylized 'a',, when I first looked at it!

  • the scaling between the outline and the bitmap is meaningless - the outline is scaled to the width of "any-filled pixels", which means it is a lot wider and taller than the actual outline used for calculating the bitmap (half-pixels means it is a light-shade, etc), by up to almost two squares in both directions. In the above, the bitmap is 17x 25, and the outline is scaled to 17x25 - but it can be seen quite clearly from the figure above, that the bitmap is really calculated from an outline which was only just over 15 pixels wide in this scale.

@HinTak HinTak changed the title glyph-vector-2 svg overlap, bitmap inverted and also scaling wrong. glyph-vector-2 svg example, bitmap inverted and also scaling wrong. Apr 30, 2017
@HinTak
Copy link
Collaborator Author

HinTak commented Apr 30, 2017

glyph-vector-2-cairo

This is how it should look (from the still-in-dev rewrite - not doing svg yet)

@HinTak
Copy link
Collaborator Author

HinTak commented Apr 30, 2017

screenshot from 2017-04-30 08-07-48

Screenshot from ftgrid (one of the the freetype demo programs) - This is the authoritative answer as how freetype does it.

@HinTak
Copy link
Collaborator Author

HinTak commented Apr 30, 2017

It seems the alignment in mine is still a bit off.

edit correct version - note bottom of g. Was scaling by integer from top instead of floating point.

glyph-vector-2-cairo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant