Skip to content

Feature/typst font weight & style #12554

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

Merged
merged 2 commits into from
May 12, 2025
Merged

Conversation

gordonwoodhull
Copy link
Contributor

#10516 points out that we don't support font-weight or font-style in our translation from CSS properties to Typst properties.

We should. Here they are!

Filing as draft because

  1. The tests are in the feature-format matrix, which we don't run automatically.
  2. Not sure whether to put this in 1.8 or 1.7

@gordonwoodhull gordonwoodhull force-pushed the feature/typst-font-weight-style branch from 9a9c7b9 to 806172a Compare April 15, 2025 22:39
@cderv cderv added this to the v1.8 milestone Apr 16, 2025
@cderv
Copy link
Collaborator

cderv commented Apr 16, 2025

Not sure whether to put this in 1.8 or 1.7

It seems to be working and low impact so I would say ok for 1.7, as I don't like shipping with missing things we know how to do. The other brand local font stuff for HTML is something I would have like to have;

But it may be too late in our release phase schedule...

@cderv cderv requested a review from cscheid April 16, 2025 09:30
@cderv cderv removed this from the v1.8 milestone Apr 16, 2025
@gordonwoodhull gordonwoodhull marked this pull request as ready for review April 16, 2025 11:58
@cscheid
Copy link
Collaborator

cscheid commented Apr 16, 2025

We can consider a 1.7 backport, but I think we've been stable enough with bugs that I'd like to try and make an official release by the end of the week, so to 1.8 it would go.

@cscheid cscheid added this to the v1.8 milestone Apr 16, 2025
@gordonwoodhull gordonwoodhull changed the title Feature/typst font weight style Feature/typst font weight & style Apr 18, 2025
@cderv
Copy link
Collaborator

cderv commented May 12, 2025

@gordonwoodhull I was playing with TYPST CSS for a presentation, and I remember this. Is this ready to merge ?

@gordonwoodhull
Copy link
Contributor Author

I think so! Let me give it another look and I’ll merge this afternoon.

would have fixed these in #12487 but we don't test ff matrix automatically
@gordonwoodhull gordonwoodhull force-pushed the feature/typst-font-weight-style branch from 806172a to 9c97621 Compare May 12, 2025 19:22
@gordonwoodhull
Copy link
Contributor Author

TIL that most of the font weight names are actually not standardized in CSS, except for "normal" and "bold". This helps explain why this has taken some iteration.

(I was wondering if we should support "heavy" as a synonym for "black" and it seems there isn't any good answer to that.)

Anyway, I think this is good to merge. I'd like to figure out how to get the feature-format matrix tests running regularly, or else move them into the smoke tests. But that can wait.

@gordonwoodhull gordonwoodhull merged commit b930d19 into main May 12, 2025
49 of 51 checks passed
@gordonwoodhull gordonwoodhull deleted the feature/typst-font-weight-style branch May 12, 2025 20:16
gordonwoodhull added a commit that referenced this pull request May 12, 2025
@cderv
Copy link
Collaborator

cderv commented May 13, 2025

I'd like to figure out how to get the feature-format matrix tests running regularly, or else move them into the smoke tests. But that can wait.

Let's schedule some time to work on that together. I'll note that for me as 1.8 work on our CI update.

@cscheid
Copy link
Collaborator

cscheid commented May 13, 2025

(I was wondering if we should support "heavy" as a synonym for "black" and it seems there isn't any good answer to that.)

My direct answer is "yes, I think we should". But let me give a longer answer in the context of the complexity with accumulate with these decisions.

Intentionally or not, we've had a philosophy emerge in Quarto which is "we will do what the user expects". I think it's a good thing, but it makes debugging harder than it otherwise would have been. It makes me wonder if there's a something we can design in our code that would alleviate these concerns.

For example: right now, our logging infrastructure is used sparingly and inconsistently. I wonder if it would be productive to promote this infrastructure to "instrumentation", so we would always write the "info" or "debug" printouts to a file in the .quarto directory. Then, we could have a "quarto report-diagnostics" command that produces a report (human-readable, machine-readable, or both) of everything that was captured in the logs. We could add this to our bug reports and we could create tooling to filter and test against.

In this specific case, our code could make the translation of heavy to bold, but we would add a note that would attest to that translation to the logs, so that we could both detect when it happened, and test whether it does in our test suite.

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

Successfully merging this pull request may close these issues.

3 participants