FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[[ 14436 ]] Ensure valid custom fonts can be loaded on Android by livecodepanos · Pull Request #7415 · livecode/livecode · GitHub

This repository was archived by the owner on Aug 31, 2021. It is now read-only.
/ livecode Public archive

[[ 14436 ]] Ensure valid custom fonts can be loaded on Android - #7415

Open
livecodepanos wants to merge 1 commit into
livecode:develop-9.6from
livecodepanos:bugfix-14436
Open

[[ 14436 ]] Ensure valid custom fonts can be loaded on Android#7415
livecodepanos wants to merge 1 commit into
livecode:develop-9.6from
livecodepanos:bugfix-14436

Conversation

Copy link
Copy Markdown
Contributor

This patch makes the validity check for Android custom fonts less strict. Previously the code was allowing only fonts that had specific values for name_id, platform_id, encoding_id and language_id.

This was too strict and resulted in valid fonts being rejected. The patched code only checks for name_id.

Tested on an Android 10 physical device.

Before:

After:

This patch makes the validity check for Android custom fonts less
strict. Previously the code was allowing only fonts that had
specific values for name_id, platform_id, encoding_id and language_id.
This was too strict and resulted in valid fonts being rejected.
The patched code only checks for name_id.
livecodepanos added this to the 9.6.2-rc-1 milestone Aug 13, 2020
// It appears that the platform to use here is 1 (Macintosh according to the spec).
FT_Get_Sfnt_Name(t_font_face, i, &t_sft_name);
if (t_sft_name.name_id == 4 && t_sft_name.platform_id == 1 && t_sft_name.encoding_id == 0 && t_sft_name.language_id == 0 && t_sft_name.string_len != 0)
if (t_sft_name.name_id == 4 && t_sft_name.string_len != 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looking at the bug report I'm not sure this is correct.

There are two issues here from what I can see...

Several of the fonts listed in the bug report have their names encoded as UTF-16BE and not native - that is probably why some of those (which do have matching criteria!) do not work correctly (I also suspect they are incorrectly built fonts!).

The second is that we are not searching will less strict criteria if stricter criteria fail.

The first of these is more serious than the second as I suspect it is why several of the fonts in that bug report which do have 4100 entries are not working - and means that even if other (less strict) searches are done, it still won't work.

livecodepanos modified the milestones: 9.6.2-rc-1, 9.6.3-rc-1 Nov 24, 2020
runrevmark added the WIP label Jun 30, 2021
runrevmark removed this from the 9.6.3-rc-1 milestone Jun 30, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL