vidstige / NRasterizer

OpenType parser in pure c#
Apache License 2.0
40 stars 11 forks source link

fixed CompositeGlyph matrix transformation #35

Closed prepare closed 7 years ago

prepare commented 7 years ago

Detail in the picture below,

s_transform_normal

prepare commented 7 years ago

@vidstige , I tested it on my machine, but I don't know how to fix Travis CI Error

vidstige commented 7 years ago

Thank you so much for this fix! Some minor comments. As for the build error, just click "details" to see log. :-) The log says the following:

Unhandled Exception:
System.IO.FileNotFoundException: Could not find file "/home/travis/build/vidstige/NRasterizer/..\..\..\Fonts\CompositeMS.ttf".
File name: '/home/travis/build/vidstige/NRasterizer/..\..\..\Fonts\CompositeMS.ttf'

The build runs on mac, so perhaps you can guess the problem from this exception? I added some comments on how to adress this issue.

vidstige commented 7 years ago

Only thing remaining is the transformation thing.

prepare commented 7 years ago

Haha,

Where in the truetype spec does it says you need normal transformation? It's probably just that they store R matrix in column major order

you are right, I don't think that way before.

That fix (TransformNormal()), I bring it from here ... https://github.com/MikePopoloski/SharpFont/blob/master/SharpFont/Internal/Geometry.cs#L88

prepare commented 7 years ago

Only thing remaining is the transformation thing.

I fixed it in the latest PR

vidstige commented 7 years ago

Great, thank you very much! :-)