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

Font size dependent on image size (px) #48

Open
Kwarcek opened this issue Feb 18, 2019 · 3 comments
Open

Font size dependent on image size (px) #48

Kwarcek opened this issue Feb 18, 2019 · 3 comments

Comments

@Kwarcek
Copy link

Kwarcek commented Feb 18, 2019

Is there any function to setFontSize dependent on image size (px) ?
I want the text to be extended (fontsize set) over the whole width of the image (and height - multiline)

@Lukasss93
Copy link

Hi, check this pull request: #30

@Kwarcek
Copy link
Author

Kwarcek commented Feb 19, 2019

Hi, check this pull request: #30

Can you tell me how to download version with fitfontsize ?
I used composer and don't know how to connect with fitfontsize ?
Default box.php don't have this method ;/

@Lukasss93
Copy link

  1. Download this library and manually include it in your project.
  2. Open this pull request: Method to calculate drawn text and automatically fit font size #30
  3. Open the tab "Files changed"
  4. Click the "View file" button from the "src/Box.php" panel
  5. Click the "Raw" button
  6. Copy the raw content and replace it in your Box.php content
  7. Enjoy

PS. successfully tested by me.

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

2 participants