Giter VIP home page Giter VIP logo

Comments (6)

LeQuangKhai99 avatar LeQuangKhai99 commented on June 3, 2024 1

Hi @endroid, file_exists($label->getFont()->getPath()) return true.

from qr-code.

LeQuangKhai99 avatar LeQuangKhai99 commented on June 3, 2024 1

@endroid I'm sorry, i was installed this package to another project and it work well. I think i will uninstall and try again. Thanks!

from qr-code.

endroid avatar endroid commented on June 3, 2024

Hi @LeQuangKhai99 what version are you using? The current version checks if the path to the font exists (this happens in Label::create) while the imagettfbbox method is called later, when writing the image. So it appears that the font does exist but it can't be opened. Please put a debug statement in the LoadImageData class just before the imagettfbbox method and tell me what $label->getFont()->getPath() resolves to and what file_exists($label->getFont()->getPath()) resolves to.

from qr-code.

LeQuangKhai99 avatar LeQuangKhai99 commented on June 3, 2024

image

noto_sans.oft is exist

from qr-code.

endroid avatar endroid commented on June 3, 2024

Thank you. And the output of the path please. And could you try using realpath() around the path, like $labelBox = imagettfbbox(realpath($label->getFont()->getSize()), 0, $label->getFont()->getPath(), $label->getText());

And if that does not work, what does file_get_contents give? Can it read the file?

from qr-code.

endroid avatar endroid commented on June 3, 2024

Np, glad to hear your problem is solved!

from qr-code.

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.