You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support numeric font-weight, bolder and lighter, and font-size: larger and smaller #545
Measured on gravitypdf at d660a410, PHP 8.5.4. All of these are ignored:
Rule
Browser
mPDF
p{font-weight:700}
bold
normal
p{font-weight:600}
bold
normal
p{font-weight:bolder}
bold
normal
div{font-size:20pt} p{font-size:larger}
24pt
11pt
div{font-size:20pt} p{font-size:smaller}
about 16.7pt
11pt
setCSS() knows only bold and normal for font-weight, and only absolute sizes, keywords such as small, and lengths for font-size.
Fix.
font-weight 100–900: 600 and above are bold, and lower weights normal, while a family has two weights. bolder and lighter are computed from the parent's weight, using the table in CSS Fonts.
font-size: larger and smaller: the parent's size multiplied or divided by 1.2.
Activity