是否有任何单code字谁的字形在所有字体缺失? [英] Is there any unicode character who's glyph is missing in all fonts?

查看:233
本文介绍了是否有任何单code字谁的字形在所有字体缺失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Android上,我希望能够检测是否使用可以显示某个字符或没有,但我的理解是这样的字体是不可能的通过的检查自定义字体可以

要检测这个我在写我要检查,一个位图,然后我写的,我知道缺少另一个位图和比较的位图的内容,另一个字符的字符。如果它们相等的字符被丢失。

现在的问题是,有没有单code字谁的字形是(或多或少)保证丢失的字体通常用在Android手机?

借助统一code替换字符声音在维基百科阅读它的时候看好:

  

有用于指示问题,当一个系统是不能够呈现一个   数据流至一正确的符号。它是最常见的,当一个   字体不包含的字符,但还可以看出,当数据是   无效,不符合任何字符

但是做了一些测试后,我看到这个人物不是用来重新present失踪或者我的Windows 7电脑或Android手机我已经与(摩托罗拉Atrix)。

测试字形
解决方案

没有任何指定的Uni $ C $下用于渲染缺少中使用的字体字形的字形价值。在实际的字体,字形ID 0应始终 .notdef的字形这是用于那些缺少字形的所有字符。然而,它不能从Android上的字体这个信息,所以它不能直接使用.notdef的字形。

在统一code也有很多保留/未分配的code点和我有限的测试表明,这些code点使用.notdef的字形呈现。因此,通过使用 U + 0978 ,这是在梵文块,我可以检测,如果一些其他有效的,已知的字符存在于我想测试字体。

这是不是一个面向未来的解决方案,因为新的字形可以用在未来的Uni code财团加入保留code点。但是,对于我的需要是不够好,因为我想要做的是一个临时的事情,是不相关的任何更多的在不远的将来。

更新:

解决方案来看看U + 0978没有工作长。这个角色加入了统一code 7.0 释放的 2014年6月。另一种选择是使用一个字形存在于单向code,但,这是非常不可能在正常字体被使用。

U + 124AB 在< A HREF =HTTP://www.uni$c$c.org/charts/PDF/U12480.pdf相对=nofollow>早期王朝楔形文字块可能并不在许多存在的东西字体都没有。

On Android, I want to be able to detect if the font used can display a certain character or not, but as I understand it this is not possible with conventional means as indicated by Check if custom font can display character

To detect this I'm writing the character I want to check to a bitmap and then I write another character that I know is missing to another bitmap and compare the content of the bitmaps. If they are equal the character is missing.

The question is, is there any unicode character who's glyph is (more or less) guaranteed to be missing on fonts typically used on Android phones?

The Unicode replacement character sounds promising when reading about it on Wikipedia:

It is used to indicate problems when a system is not able to render a stream of data to a correct symbol. It is most commonly seen when a font does not contain a character, but is also seen when the data is invalid and does not match any character

However after doing a bit of testing I see that this character is not used to represent missing glyphs on either my Windows 7 computer or the Android phone I've tested with (Motorola Atrix).

解决方案

There isn't any designated Unicode value for the glyph that is used to render glyphs that are missing in the font used. In the actual font, glyph id 0 should always be the .notdef glyph which is used for all characters that are missing a glyph. However it is not possible this information from the fonts on Android, so it's not possible to use the .notdef glyph directly.

In Unicode there are many reserved/unassigned code points and my limited testing indicate that these code points are rendered using the .notdef glyph. So by using U+0978, which is a reserved code point in the middle of the Devanagari block, I can detect if some other valid, known character exists in the font I want to test.

This is not a future proof solution since new glyphs may be added to reserved code points by the Unicode Consortium in the future. But for my needs it's good enough since what I want to do is a temporary thing that is not relevant any more in the near future.

Update:

The solution to look at U+0978 did not work long. That character was added in the Unicode 7.0 release in June 2014. Another option is to use a glyph that exists in unicode but that is very unlikely to be used in a normal font.

U+124AB in the Early Dynastic Cuneiform block is probably something that doesn't exist in many fonts at all.

这篇关于是否有任何单code字谁的字形在所有字体缺失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆