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

flatHeights is incorrect for unicode text #34

Open
jittuu opened this issue Jul 28, 2021 · 0 comments
Open

flatHeights is incorrect for unicode text #34

jittuu opened this issue Jul 28, 2021 · 0 comments

Comments

@jittuu
Copy link

jittuu commented Jul 28, 2021

As below example, flatHeights and measure provide different measurement.

import TextSize from 'react-native-text-size';

const demoText = await TextSize.flatHeights({
  text: ['မြန်မာစာ'],
});

const demoSingle = await TextSize.measure({
  text: 'မြန်မာစာ',
});

// output: demoText: [17]
console.log(`demoText: ${JSON.stringify(demoText)}`);

// output: demoSingle: {"width":52.5,"lineCount":1,"height":31}
console.log(`demoSingle: ${JSON.stringify(demoSingle)}`);

The result should be 31 while flatHeights produce 17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant