Code Monkey home page Code Monkey logo

Comments (12)

justvanrossum avatar justvanrossum commented on September 27, 2024

Note that at TEST=509 the values do match, which makes me think perhaps a negative delta gets rounded differently between the two environments.

from uharfbuzz.

behdad avatar behdad commented on September 27, 2024

Please try with --font-funcs set to ot vs ft. I feel like that's where the difference is coming from.

from uharfbuzz.

justvanrossum avatar justvanrossum commented on September 27, 2024

Ha, calling hb-shape with --font-funcs=ot indeed makes a difference. The output then becomes:

482 - 491 491 491.0 True
491 - 495 495 495.5 True
500 - 500 500 500.0 True
509 - 505 504 504.5 False
518 - 509 509 509.0 True

Which is weird, because that also doesn't match the output of uharfbuzz, but differently.

from uharfbuzz.

behdad avatar behdad commented on September 27, 2024

I have to dig in, but I wonder if Python is changing FPU rounding mode..

from uharfbuzz.

ebraminio avatar ebraminio commented on September 27, 2024

am investigating this also

from uharfbuzz.

ebraminio avatar ebraminio commented on September 27, 2024

Okay, this is fixed with 985eda0 I'll add it as a test also

from uharfbuzz.

anthrotype avatar anthrotype commented on September 27, 2024

What fixed it?

from uharfbuzz.

justvanrossum avatar justvanrossum commented on September 27, 2024

I'm still seeing the same results in my local build (macOS 10.15)

from uharfbuzz.

ebraminio avatar ebraminio commented on September 27, 2024

What fixed it?

Good question! Maybe somewhere in skbuild / cmake process another roundf implementation / libm was inserted.

I'm still seeing the same results in my local build (macOS 10.15)

Are you passing --font-funcs=ot?

from uharfbuzz.

ebraminio avatar ebraminio commented on September 27, 2024

Of course I should test whether I had the issue before the change, sorry for closing eagerly, at least I can say I don't have the difference on my machine and that's regardless of passing HAVE_ROUNDF to harfbuzz.cc compile or not.

from uharfbuzz.

justvanrossum avatar justvanrossum commented on September 27, 2024

I updated my hb-shape executable, and the results now indeed match when using --font-funcs=ot, so my original report (based on HB 2.6.2) was out of date. So there's indeed no issue with uharfbuzz.

That said, I'd argue that the values returned with --font-funcs=ot are incorrectly rounded, and should match the results of --font-funcs=ft, but that would be a HB issue.

from uharfbuzz.

ebraminio avatar ebraminio commented on September 27, 2024

Thank you!

That said, I'd argue that the values returned with --font-funcs=ot are incorrectly rounded, and should match the results of --font-funcs=ft, but that would be a HB issue.

Feel free to file that as a bug against harfbuzz.

from uharfbuzz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.