Skip to content
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

mongolian font support #3792

Closed
daria2023 opened this issue Nov 13, 2024 · 1 comment
Closed

mongolian font support #3792

daria2023 opened this issue Nov 13, 2024 · 1 comment

Comments

@daria2023
Copy link

Description

I'm using jspdf v2.5.1, and faced the mongolian font error problem:
here is how i create the instance :

    this.doc = new jsPDF({
      orientation: 'p',
      unit: 'px',
      format: [width, height],
      hotfixes: ['px_scaling'],
      compress: true,
    })

and i'm using canvas context to draw text, like this:

    this.ctx = this.doc.context2d
    this.ctx.font = '24px NotoSansMongolian-Regular'
    this.ctx.fillText(' ᠬᠦ ᠲᠦ ᠳᠠᠨᠠᠢᠨ᠎ᠠ',100,100)

the test font is downloaded on google font NotoSansMongolian-Regular, and i've followed the readme instruction and convert the font to js module and import it on the html like this:

<script  type="module" src="/public/NotoSansMongolian-Regular-normal.js"></script>

and it is using the mongolian font fine, but the thing is the font should looked like this(each character group together to show the whole word):
image

but it just displayed each character alone:
image

since it looks fine on browser when using this specific font, i think maybe there need a specific procession on the low level font process?

Copy link

This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant