Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Here you should submit your bug reports with logcat.
  • Page:
  • 1

TOPIC:

The text is garbled on some devices 1 year 8 months ago #15760

  • ericatudn
  • ericatudn's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 1
Hi.
The text of this book (154727_T.pdf) is garbled on some devices.
For example:
It looks good on Asus X01BDA (Android 9, Api Level 28), see ASUS_X01BDA_And_9.png.
But the text appeared garbled on Google Pixel 5 (Android 12, Api Level 32), see Google_Pixel5_And_12.png.
User has complained for this on Google Play,
Please help to solve this problem.
Thank you very much.
Attachments:

Please Log in or Create an account to join the conversation.

The text is garbled on some devices 1 year 8 months ago #15761

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
dear user:
the PDF file using lots un-embed fonts.
DFHeiStd-W3-ETen-B5-H
DFHeiStd-W5-ETen-B5-H
DFHeiStd-W7-ETen-B5-H
DFLiSongStd-W3-ETen-B5-H
DFLiSongStd-W5-ETen-B5-H
DFMingStd-W7-ETen-B5-H
DFMingStd-W9-ETen-B5-H

on some devices, CJK fonts may be OK.
on some devices, CJK fonts may not be OK.
it depends on font setting in Global.Init()// set default font for Traditional Chinese.
if (!setDefaultFont("CNS1", "Noto Sans CJK TC Regular", true) &&
!setDefaultFont("CNS1", "Noto Sans CJK TC", true) &&
!setDefaultFont("CNS1", "Noto Sans TC Regular", true) &&
!setDefaultFont("CNS1", "DroidSansFallback", true) && face_name != null)
setDefaultFont("CNS1", face_name, true);
if (!setDefaultFont("CNS1", "Noto Sans CJK TC Regular", false) &&
!setDefaultFont("CNS1", "Noto Sans CJK TC", true) &&
!setDefaultFont("CNS1", "Noto Sans TC Regular", false) &&
!setDefaultFont("CNS1", "DroidSansFallback", false) && face_name != null)
setDefaultFont("CNS1", face_name, false);

Please Log in or Create an account to join the conversation.

The text is garbled on some devices 1 year 8 months ago #15762

  • ericatudn
  • ericatudn's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 1
Thanks for your reply.
In the code you provide, I found !setDefaultFont("CNS1", "Noto Sans CJK TC", true) repeat twice (passing true both.).
So I change the second setDefaultFont("CNS1", "Noto Sans CJK TC", true) to setDefaultFont("CNS1", "Noto Sans CJK TC", false) , just like other setDefaultFont() call in the same group.
And it seems solve the problem.
Is it a bug?
Can I fix it this way?
Will it cause other problem?
The following user(s) said Thank You: radaee

Please Log in or Create an account to join the conversation.

Last edit: by ericatudn.

The text is garbled on some devices 1 year 8 months ago #15763

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
thanks, and you are right.
we using worng codes copied from another line.
 
The following user(s) said Thank You: ericatudn

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum