gd-text icon indicating copy to clipboard operation
gd-text copied to clipboard

Font size dependent on image size (px)

Open Kwarcek opened this issue 6 years ago • 3 comments

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)

Kwarcek avatar Feb 18 '19 09:02 Kwarcek

Hi, check this pull request: https://github.com/stil/gd-text/pull/30

Lukasss93 avatar Feb 18 '19 10:02 Lukasss93

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 ;/

Kwarcek avatar Feb 19 '19 15:02 Kwarcek

  1. Download this library and manually include it in your project.
  2. Open this pull request: https://github.com/stil/gd-text/pull/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.

Lukasss93 avatar Feb 19 '19 15:02 Lukasss93