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 issues #82

Closed
ArtemZlagoda opened this issue Apr 8, 2022 · 2 comments
Closed

Font size issues #82

ArtemZlagoda opened this issue Apr 8, 2022 · 2 comments

Comments

@ArtemZlagoda
Copy link

Hey!
Faced a problem
Nested tspan not getting the right font size
Simple example

header("Content-Type: text/html; charset=utf-8");

include $_SERVER['DOCUMENT_ROOT'].'/vendor/autoload.php';

use Dompdf\Dompdf;


$svg = '<svg xmlns="http://www.w3.org/2000/svg" width="600" height="250">
					<text x="10" y="10" font-size="18">F<tspan dy="4" font-size="6px">1</tspan></text>
				</svg>';

$html = '<img src="data:image/svg+xml;base64,'.base64_encode($svg).'"  width="600" height="250" />';


$dompdf = new Dompdf();
$dompdf->load_html($html, 'UTF-8');
$dompdf->setPaper('A4', 'portrait');
$dompdf->render();

$dompdf->stream("new_file.pdf");

In the file received from dompdf, the set font size for tspan is ignored, i.e. I get just F1 instead of F with index 1

@bsweeney bsweeney transferred this issue from dompdf/dompdf Apr 8, 2022
@bsweeney
Copy link
Member

bsweeney commented Apr 8, 2022

tspan is not supported as of yet, watch #64 for updates

@bsweeney bsweeney closed this as completed Apr 8, 2022
@fateenarinah
Copy link

Any progress on this? I'm experiencing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants