-
Notifications
You must be signed in to change notification settings - Fork 331
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
Typst brand yaml: typography bells and whistles #10974
Typst brand yaml: typography bells and whistles #10974
Conversation
eeafabf
to
094ebe2
Compare
weight style size decoration color background-color line-height
there are no abstractions here each element has different properties supported
094ebe2
to
6cb26c3
Compare
5a7055f
to
26b8a1e
Compare
Hmm, perhaps I should not use It is helpful for testing that the font caching pipeline is working, because I can #set text(fallback: false) and Typst won’t output text in fonts it doesn’t have. But So I’ve got one falling test which I give up on for today. But otherwise this is ready. |
rename typst_css_to_props typst_css_property_processing
cea828e
to
e071aa8
Compare
basis case for translating base.size: 1rem to avoid infinite recursion expose parse_length and use for base.size
broaden test for inconsident spaces in pdftotext pdftotext provides inherently inconsistent output with spaces and even ordering varying by platform it should probably not be used with such long strings (and this isn't necessary because the properties are tested in ensureTypstFileRegexMatches)
e071aa8
to
29aca72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gordonwoodhull do we want to keep the PDF committed ?
Is this to have an example of default template ?
Just wondering, it case it was for testing initially
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @cderv!
Nope, it looks like this artifact is generated when the .typ
is edited in vscode. (Seems to happen with any valid .typ
file.) There is no reason to compile a template on its own, never mind check it in.
I've removed it.
This is in good shape and has basic test coverage for all supported feature-element combinations.
Also includes support for subtitles in typst, taking @mcanouil's contribution to the Pandoc template from upstream #9638, and styling it as a heading.
Leaving this as a draft for now because although I'd be happy merging this in its current state, there are a few last touches to make:
brand.typography
should allow use of named colors frombrand.color
forcolor
,background-color
rem
correctly whenbrand.typography.base.size
is specified. Current blind change toem
will be the fallback with a warning whenbase.size
is unknownpadding
andwidth
for logo - currently one must use Typst-compatible units.