react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Ukrainian support

Open sergical opened this issue 2 years ago • 6 comments

Trying on https://react-pdf.org/repl

The following text

Оплата була зроблена на цей гаманець

Screenshot: Screenshot 2024-05-31 at 11 05 40 AM

sergical avatar May 31 '24 18:05 sergical

I suspect it could be an issue with the font rather than React-PDF maybe? Does the font embedded in the example support Cyrillic letters?

nikischin avatar May 31 '24 21:05 nikischin

Agreed, we tested with a locally loaded font that supports Cyrillic and saw the same results, hence I am here. I figured the generic font on the preview would support it.

sergical avatar May 31 '24 21:05 sergical

You probably need to use and register a font that supports unicode. e.g.

import { Font } from "@react-pdf/renderer";

Font.register({
  family: "Noto",
  src: "https://example-server.com/fonts/NotoSans_Condensed-Regular.ttf",
});

sharpcoding avatar Aug 28 '24 12:08 sharpcoding

Yep. You need a custom font that has those glyphs

diegomura avatar Sep 22 '24 18:09 diegomura

Can you suggest one that works well?

sergical avatar Sep 22 '24 18:09 sergical

Unfortunately not. I don't know any ukranian fonts

diegomura avatar Sep 22 '24 18:09 diegomura