Skip to content

Add region option to template wizard #48

Closed as not planned
Closed as not planned

Description

@Leedehai

Description

Hi, this Typst code snippet

// C
汉皇重色思倾国,御宇多年求不得。杨家有女初长成,养在深闺人未识。\
天生丽质难自弃,一朝选在君王侧。回眸一笑百媚生,六宫粉黛无颜色。

// J
日本語の音韻は、「っ」「ん」を除いて母音で終わる開音節言語の性格 \
が強く、また標準語を含め多くの方言がモーラを持つ。

// K
(The Korean punctuations are rendered okay, because it uses European punctuations.)
대한항공은 대한민국 국적의 항공사이며, 항공 동맹체인 스카이팀의 창립 항공사로 인천국제공항과 김포국제공항을 허브 공항으로 두고 있다.

was rendered correctly in PDF locally, with the Typst CLI:
Screenshot 2023-05-21 at 11 03 04

but the web app rendered the punctuations differently. Specifically, they are put at the middle of the character boxes, instead of at the corner:
Screenshot 2023-05-21 at 11 04 07

I'm not sure this is a font issue, though -- you may notice the glyph's fonts are different in the local PDF vs the web app (for example, Screenshot 2023-05-21 at 11 18 00 vs Screenshot 2023-05-21 at 11 18 11). The PDF version is generally more common in modern usage.

Maybe @peng1999 has some insights, but this issue only manifests on the web app so maintainers's involvement might be necessary.

Reproduction URL

https://typst.app/project/rFk7tfTxRTj_lwChTsvuV7

Browsers

Chrome

OS

macOS

Activity

  1. added
    bug
    on May 21, 2023
  2. Leedehai commented on May 21, 2023

    @Leedehai
    Author

    (Sorry, I didn't mean to put reknih@ on the spot but it appears GitHub automatically assigns this issue)

  3. Enivex commented on May 21, 2023

    @Enivex

    (Sorry, I didn't mean to put reknih@ on the spot but it appears GitHub automatically assigns this issue)

    That intentionally happens on any issue with the web app label.

  4. peng1999 commented on May 21, 2023

    @peng1999

    This is font issue. The default CJK fallback font in web app is TW or HK variant of Noto CJK. You should select CN and JP font variant respectively in you document to get right glyphs.

  5. Leedehai commented on May 22, 2023

    @Leedehai
    Author

    Nice, thx! Probably a question to maintainers: wondering whether this is intentional to have different default fonts in the local PDF vs the web app? That seems a bit surprising to users, but there may be other reasons I didn't know.

  6. peng1999 commented on May 22, 2023

    @peng1999

    A simple idea is to add a language and region option in template wizard. Then a single #set text(lang: "zh") will fix this issue without touching font fallback machanism.

  7. laurmaedje commented on May 22, 2023

    @laurmaedje
    Member

    The default fonts are the same. Here, it's that font fallback happens (which picks any suitable font from all that are available). And the set of available fonts differs in the web app and your local operating system (because we use your system fonts instead of downloading our own 2GB of fonts).

  8. laurmaedje commented on May 22, 2023

    @laurmaedje
    Member

    A simple idea is to add a language and region option in template wizard.

    Language already exists. Adding region seems sensible.

  9. transferred this issue fromtypst/typston Oct 9, 2023
  10. added
    fonts
    on Oct 9, 2023
  11. changed the title [-]Punctuation issue with CJK characters, only in web app[/-] [+]Add region option to template wizard[/+] on Nov 21, 2023
  12. removed their assignment
    on Jan 16, 2024
  13. added
    feature request
    and removed
    fonts
    bug
    on Feb 7, 2024
  14. laurmaedje commented on Nov 30, 2024

    @laurmaedje
    Member

    Closing this as we don't plan to further develop the template wizard. I doubt many people are still using it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions