Skip to content

Conversation

@cderv
Copy link
Contributor

@cderv cderv commented Oct 8, 2025

closes #31
closes #36

This builds on #36 and work by @elipousson

This PR

  • does keep the basic support added in Add typst support (#31) #36 but remove the color addition (to be dealt with in Added support for color (?) #35 )
  • It does also rebase on latest dev version (with v6.7.2 support in HTML and LaTeX)
  • And it adds feature parity support with current state of extension, meaning
    • All CSS sizing for HTML needs to be supported with em conversion in typst. Values from the CSS are used
    • Default icons in this extension are solid type. Typst package default to regular so this is changed.
    • FA v6 is configured as v7 is not yet supported

This PR seems to be ok and produce this PDF
example-typst.pdf

However, I am puzzled because we're missing font handling.

Also, while doing quarto render I don't see warning. but adding keep-typ: true and calling quarto typst compile does show expected message

❯ quarto render .\example.qmd --to typst
pandoc 
  to: typst
  output-file: example.typ
  standalone: true
  shift-heading-level-by: -1
  default-image-extension: svg
  wrap: none
  citeproc: false
  variables: {}

metadata
  title: Font Awesome Quarto Extension

[typst]: Compiling example.typ to example.pdf...DONE

Output created: example-typst.pdf
❯ quarto typst compile .\example.typ
warning: unknown font family: font awesome 6 free solid
   ┌─ @preview/fontawesome:0.6.0\lib-impl.typ:80:12
   │
80 │       font: default_fonts, // If you see warning here, please check whether the FA font is installed
   │             ^^^^^^^^^^^^^

warning: unknown font family: font awesome 6 brands
   ┌─ @preview/fontawesome:0.6.0\lib-impl.typ:80:12
   │
80 │       font: default_fonts, // If you see warning here, please check whether the FA font is installed
   │             ^^^^^^^^^^^^^

warning: unknown font family: font awesome 6 free
   ┌─ @preview/fontawesome:0.6.0\lib-impl.typ:80:12
   │
80 │       font: default_fonts, // If you see warning here, please check whether the FA font is installed
   │             ^^^^^^^^^^^^^

So we need a way to provide new font in Typst font path from an extension. Probably related to

So maybe Typst support needs to wait for 1.9 ?

elipousson and others added 13 commits October 8, 2025 14:04
(cherry picked from commit d33823d)
(cherry picked from commit 6161b0e)
Also adds support for brands group + fill parameter

(cherry picked from commit 9fa2535)

# Conflicts:
#	example.qmd
Also adds support for tiny to Huge size specification for typst

(cherry picked from commit 09fa6c1 where change regarding specific support mention in documentation has been removed)

# Conflicts:
#	example.qmd

Co-authored-by: Christophe Dervieux <cderv@posit.co>
Renamed for consistency w/ PR for color icons in HTML and LaTeX PDF formats

(cherry picked from commit 6f978fd where usage of color and specific format option has been removed from example.qmd. This is because there is not yet feature parity on this for format and we don't want to advertise yet until support)

# Conflicts:
#	example.qmd

Co-authored-by: Christophe Dervieux <cderv@posit.co>
we need a cross-format way to handle this. And `color` args was not one of them until now (#23)
- type solid is the default in this extension, which is not for typst package
- size can be one of the known CSS class id which are converted to `em`
@cderv cderv mentioned this pull request Oct 8, 2025
@elipousson
Copy link

This is great. Thank you for picking up the PR and running with it!

@cderv
Copy link
Contributor Author

cderv commented Oct 15, 2025

So @gordonwoodhull explained me why this works without having the font path. This is because we do use fontawesome in Quarto CLI for callout, and for that we do already provide the FA v6 fonts in Typst font path.

So there is no need to handle font directly in this extension.

However, there is a topic of using this extension with callouts as two different version of the typst package will be loaded... 🤔

@cderv cderv closed this Oct 15, 2025
@cderv cderv reopened this Oct 15, 2025
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.

Support typst

3 participants