From 4e0938bf0241be9ba76a87b1453dc8725cec7499 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 1 Jan 2025 20:00:15 -0500 Subject: [PATCH 1/3] advanced typst brand yaml documentation fixes quarto-dev/quarto-cli#11083 fixes quarto-dev/quarto-cli#11278 addresses quarto-dev/quarto-cli#11683 addresses https://github.com/quarto-dev/quarto-cli/discussions/11616#discussioncomment-11473859 just a draft - some of this stuff might belong better elsewhere --- docs/advanced/typst/big-number-bug.png | Bin 0 -> 11734 bytes docs/advanced/typst/brand-yaml.qmd | 124 +++++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 docs/advanced/typst/big-number-bug.png create mode 100644 docs/advanced/typst/brand-yaml.qmd diff --git a/docs/advanced/typst/big-number-bug.png b/docs/advanced/typst/big-number-bug.png new file mode 100644 index 0000000000000000000000000000000000000000..49911da8a5fa0a71e75eac2abb2f5f96d08f95f8 GIT binary patch literal 11734 zcmdUVWmKG7(r)AK4#C|mxVt2{ySuwX0>L3zaCb;>cXtg04ekVYm;2_-nVECXn)z|> z`u=>qR`15XWxV=KLPrXRDjNkS z(*K#MVqF^zje))eK5qdGjo{!beWbAmVaW^jwv@LUCR^9zlHatwrpv(Oha#5+Uy>LS{Tcfoye@V$rk2j`duW<<_ot< zu+A55z2Hj3pM8VQr2gO_t<1?}Gw_@#7%%mYBp3(Zjq18&$S~iL+ypI9GdqN!Zc3mo z2@`Nr>y=K*zsgcyI;8y~PxJNPg;noo(;NabZho6AwD z7`HD3)k4~tyf@S~f~`+PmLNr_PBddOGE@^~6F-ih#eQh_i>>6*SsNF-sqO^o+ITY3 zL(a@=*^tb7$rbA{1Db<0u?xdkghF5nyp!-pZdP<-q%iUw9w#F)&eCA5>!k9#hp+Mu%Bagk|P?JGA>LjRg#_fbRjg2y@i&j_4t7 z;upgkz16T1U?0COIMqnUqZV&E30QRmlvy*_Q;$az)eJsMGv~8q@*U=P}P8mWt}Nj9R^b%oq#YR!C9q; zP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CqaWt4*>J6+W)tRci&s%o@e^eOm_J()-E zeuI;b%dd+9uDTu$T+{B95v>sfG3qFyf${OvT&C((fAFYiu{)$eM1*wnAAgxu<9=Uq_@t|+&*l^jPmVF$^&T@A z^uDA1bv+V-;7wa!bH*Eh>uXlTP1RIqgh`l}Az_9*!|xzN@WGX+&`V-;182c?l?*DS z&JqngGAaP2%KT>L0S2#-N(&iX`XhkB;bT)F;eb}LB$ce=cSt^B0@eS|iWJtr@Sayg zI`T!YYJ(&;`kXPpeDJBokC@LD3)O90wA88!g>sls&_-9oJ$X)NN|*xY=6Z<-P&;Pf zxFlB>ZAJw5xGEJ>XuEsM4( zcmHsLl#ajZNi2%Lp+-bXW}X31to`I&GLxILwC}{hyMb9iij9WJ&1 | grep *fontname* +``` + +Unfortunately with Typst 0.11, there is no flag to ignore system fonts, so you'll need to grep for the font name. + + +With Typst 0.12, you can run + +``` +quarto typst fonts --ignore-system-fonts --font-path .quarto/typst-font-cache/ +``` + +to list only the fonts downloaded by Quarto. (In either version of Typst, ``--variants`` can be helpful for more detail.) + +If the font is listed but it still isn't working, check for variation in the font name. For example, the Sono font can be downloaded from Google Fonts as Sono, but Typst will only accept Sono Extralight Monospace. + +### "Big number" bug + +![](big-number-bug.png) + +If you encounter issue [#11683](https://github.com/quarto-dev/quarto-cli/issues/11683), with numbers displaying larger than surrounding text in table output, this is happening because none of the text fonts requested by your table package are available, but some of the emoji fonts are. + +Please specify an available font to your table package. In the future, Quarto may implement "font stacks" like `system-ui` and `sans-serif` in Typst CSS to fix this bug, but currently these are passed through verbatim, and Typst won't recognize font stacks. + +### Typography Test coverage + +Which kitchen sink test files contain unique tests for a feature/element combination? + +For non-unique tests, first file index is listed. + +| | base | headings | title | subtitle | monospace-inline | monospace-block | link | +|------------------|------|----------|-----------|----------|------------------|-----------------|-------| +| family | 1 | 1 | 1 | 1 | 1 | 1 | R | +| size | 1 | NA | NA | NA | 1 | 1 | R | +| weight | 1 | 1 | 1 | 1 | 1 | 2 | 2 | +| style | R | 1 | 1 | 1 | R | R | R | +| color | 1 | 1 | 1 | 1 | 1 | 1 | 1 | +| background-color | R | R | R | R | 1 | 1 | 1 | +| decoration | R | R | R | R | R | R | 1 | +| line-height | 1 | 1 | 1 | 1 | NA | 1 | NA | From 3b79e2c0594197cd294d049c5470240c84f9fee9 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Wed, 1 Jan 2025 20:32:47 -0500 Subject: [PATCH 2/3] typst logo defaults --- docs/advanced/typst/brand-yaml.qmd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/advanced/typst/brand-yaml.qmd b/docs/advanced/typst/brand-yaml.qmd index 799edf66f1..92d2388761 100644 --- a/docs/advanced/typst/brand-yaml.qmd +++ b/docs/advanced/typst/brand-yaml.qmd @@ -31,13 +31,16 @@ In all formats, `logo` can be the path to a logo or the name of a `brand.logo` r The Typst implementation also supports `width` -: Width in CSS units +: Width in CSS units. Default `2in`. + `location` : Location on the page in X and Y using CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) and [`text-vertical-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) keyword values, specifically `left`, `center`, `right` and `top`, `middle`, and `bottom`. - The X and Y components are combined with a dash, e.g. `left-top`, `center-middle` + The X and Y components are combined with a dash, e.g. `left-top` (the default), `center-middle`, etc. + Applied as Typst [`align`](https://typst.app/docs/reference/layout/align/). + `padding`, `padding-top`, `padding-right`, `padding-bottom`, `padding-left` -: Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions. Due to a limitation in the Lua implementation of YAML, multiple padding options are applied in alphabetical order instead of the order of the YAML object. +: Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions. Due to a limitation in the Lua implementation of YAML, multiple padding options are applied in alphabetical order instead of the order of the YAML object. Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). Default `padding: 0.5in`. ## Typography From 60a74947b016510b80f99da613890889ec5860d0 Mon Sep 17 00:00:00 2001 From: Gordon Woodhull Date: Fri, 3 Jan 2025 16:31:57 -0500 Subject: [PATCH 3/3] update typst brand logo defaults to match smaller logo in quarto-dev/quarto-cli#11777 --- docs/advanced/typst/brand-yaml.qmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/typst/brand-yaml.qmd b/docs/advanced/typst/brand-yaml.qmd index 92d2388761..370fcd8f0c 100644 --- a/docs/advanced/typst/brand-yaml.qmd +++ b/docs/advanced/typst/brand-yaml.qmd @@ -31,7 +31,7 @@ In all formats, `logo` can be the path to a logo or the name of a `brand.logo` r The Typst implementation also supports `width` -: Width in CSS units. Default `2in`. +: Width in CSS units. Default `1.5in`. `location` : Location on the page in X and Y using CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align) and [`text-vertical-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) keyword values, specifically @@ -40,7 +40,7 @@ The Typst implementation also supports Applied as Typst [`align`](https://typst.app/docs/reference/layout/align/). `padding`, `padding-top`, `padding-right`, `padding-bottom`, `padding-left` -: Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions. Due to a limitation in the Lua implementation of YAML, multiple padding options are applied in alphabetical order instead of the order of the YAML object. Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). Default `padding: 0.5in`. +: Amount of padding to add to each side of the logo, using CSS [`padding`](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) conventions. Due to a limitation in the Lua implementation of YAML, multiple padding options are applied in alphabetical order instead of the order of the YAML object. Applied as Typst [`block.inset`](https://typst.app/docs/reference/layout/block/#parameters-inset). Default `padding: 0.75in`. ## Typography