-
Notifications
You must be signed in to change notification settings - Fork 93
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
Text center not working for rasterized image #111
Labels
feature
New feature or request
Comments
notflip
changed the title
Text position and size different for SVG vs Rasterized
Text center not working for rasterized image
Nov 7, 2020
|
hi, beside from this setFont(new SVGFont('Raleway', 'fonts/raleway.ttf')), what else need to do to make the font working? I tried it but seem the correct font is not applied. |
@bogart0324 It's probably in the wrong folder? My fonts folder is located in my public folder, from which my php script (index.php) is being ran. |
yes same with me, I manage to make it work by replacing sprintf to printf
in SVGFont class constructor, see image attached, I hope I din't mess it up
:)
[image: image.png]
…On Mon, Dec 7, 2020 at 11:44 PM Miguel Stevens ***@***.***> wrote:
@bogart0324 <https://github.com/bogart0324> It's probably in the wrong
folder? My fonts folder is located in my public folder, from which my php
script (index.php) is being ran.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#111 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVGDQPWZ3XWHXH2AMGINHLSTTZ6LANCNFSM4TNPHJ4Q>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using the following code to rasterize an SVG image that has text
This is my code
I'm using 50% for the SVG text but it seems like the left bottom bounding box point is being used, instead of the center of the text node. Am I missing something?
Could it be that the following properties are ignored by the rasterize method?
Thank you!
The text was updated successfully, but these errors were encountered: