diegomura / diegomura/react-pdf

Using Unicode encoding font can not display text

Open
#2,266 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

```
import React from 'react';
import { Document, Page, Text, Font } from '@react-pdf/renderer';

import bizupdv9regularwoff2 from './assets/biz-udpmincho-v9-cyrillic_greek-ext_japanese_latin_latin-ext-regular.woff2'
import notojapanwoff2 from './assets/noto-serif-jp-v21-japanese_latin-regular.woff2'

const MyDocument = () => {

Font.register({ family: 'bizupdv9regularwoff2', src: bizupdv9regularwoff2, });
Font.register({ family: 'notojapanwoff2', src: notojapanwoff2, });

return (


1234567890 hello こんにちはフォントテスト
1234567890 hello こんにちはフォントテスト


)
};

export default MyDocument;

```
Run service ,then ,using the biz-udpmincho-v9-cyrillic_greek-ext_japanese_latin_latin-ext-regular.woff2 can not display text, using the noto-serif-jp-v21-japanese_latin-regular.woff2 can display text.
The font files are downloaded from [gwfh](https://gwfh.mranftl.com/fonts/biz-udpmincho?subsets=japanese,latin )
The encoding of biz-udpmincho-v9-cyrillic_greek-ext_japanese_latin_latin-ext-regular.woff2 is UnicodeFull and the encoding of noto-serif-jp-v21-japanese_latin-regular.woff2 is Adobe-Identity-0.
Can the react-pdf only use the Adobe-Identity-0 encoding font ?
How can I convert the encoding of font file from Unicode to Adobe-Identity-0?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.