Comments (11)
I have the exact same issue. But for me it works fine on Linux, it is only on Windows that it is messed up on.
from weasyprint.
I think that the horizontal and vertical positioning are two separate issues.
I vaguely recall fixing the horizontal one. What WeasyPrint version is this? Do it still happen with the git master version?
from weasyprint.
WeasyPrint==0.19.2
I will install the latest from git right now and see if it is still a problem
from weasyprint.
Oh and yeah I should have mentioned that the line height is the only thing that I currently see messed up on windows, but like I said the exact same html/css on linux comes up looking perfectly fine.
from weasyprint.
Yeah windows still has problems with line-height with the latest master version from git
weasyprint==0.20
from weasyprint.
I'm having similar issues with WeasyPrint 0.21 on OS X 10.9.
• The line height is too small but not as small as in this example.
• I have some positioning issues as well.
I opened the document in Illustrator and zoomed in. You can see the text box is not positioned as it should be.
This is the HTML document
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<TITLE>Title</TITLE>
<style>
html,body {
margin: 0;
width: 21cm;
height: 29.71cm;
font-family: 'Nimbus Sans Novus T OT';
}
@page {
margin: 0;
size: A4;
}
</style>
</HEAD>
<BODY>
Text
</BODY>
</HTML>
The same happens if I don't specify a font-family.
from weasyprint.
I can observe the same problem with the current head on Windows. Specifying line-height: 100%
at least renders something readable, but is not quite correct (some vertical offsets are off):
Linux | Windows | Windows + line-height: 100% |
---|---|---|
from weasyprint.
Issues #62 and #158 are probably duplicates of related to the original problem. If you specify multiple fonts in font-family
, font layout breaks on Windows.
I've tested with Pango 1.29.4 (current Gtk2 bundle) and 1.30.1 (current Gtk3 bundle).
from weasyprint.
Is this problem fixed with the latest version of Pango?
from weasyprint.
@cleitner @benique @byoungb @matthewkogan is thi bug fixed with new versions of Pango?
from weasyprint.
Let's say it is.
from weasyprint.
Related Issues (20)
- Text clipped when using text-anchor="middle" HOT 2
- Weasyprint.exe : Fontconfig error: Cannot load default config file: No such file: (null) HOT 8
- Support of `@media only` HOT 4
- Migrate to resvg? HOT 2
- Support grid-auto-flow: column HOT 4
- Fonts breaking in v62 HOT 8
- Grid support enhancements
- v62 - TypeError: can't multiply sequence by non-int of type 'float' HOT 1
- Create single page pdf for thermal printer HOT 1
- Bold font sometimes work but sometimes doesn't HOT 2
- Grid support with errors (print-css-rocks) HOT 3
- PDF/UA accessibility. Labeled strange. HOT 1
- TypeError: can only concatenate str (not "float") to str (after update from 61.2 to 62.1) HOT 5
- Tailwind color codes are incompatible HOT 2
- Issue when trying to write a pdf with the openssl_md5 function in your library HOT 1
- Failure when building wheel for 62.1 from pypi HOT 5
- Add support for ol start attribute HOT 2
- Weasyprint (62.1) broken on macOS using Python 3.12.3 from python.org HOT 3
- python api: set created date HOT 3
- Support overflow-x/y HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weasyprint.