Reputation: 135395
I'm attempting to display some text in my program using (say) Windows GDI and some of the unicode characters are displayed as boxes? What is up?
See also: What does it mean when my text is displayed as Question Marks?
Upvotes: 6
Views: 35021
Reputation: 21
I had this same box/character/text issue for about 2 years on Chrome for Win10 and tried all suggested fixes but none worked for me. My problem was caused by an app I hadn't considered. I use uBlock Origin to cut-down on pop-up ads. By default, uBlock also "blocks remote fonts on this site", actually every site. When the fonts are blocked then Chrome inserts something to take its place, usually a simple square or rectangle. If nothing else has worked, check you ad blocker. That function can easily be turned off and all correct text is then displayed.
Upvotes: 2
Reputation: 994041
(t-shirt image from http://www.cafepress.com/nucleartacos.163046834)
The above image represents a common failure mode of text display systems that fail to take into account the full range of Unicode characters. On Windows platforms, characters that cannot be represented using any of the available fonts are represented with an open rectangle.
Upvotes: 15
Reputation: 340356
In Windows there are 2 common display problems that occur when trying to display Unicode characters:
text sometimes appears as question marks
text sometimes appears as boxes
Upvotes: 5
Reputation: 135395
The deal is that the text you are trying to display includes characters that are not supported in the font you are using. The box character is the default substitution character for Unicode text that does not have a glyph in the font.
On Windows, if you are trying to display text in a range of different languages, use a font such as Arial Unicode MS - this includes glyphs for a vast array of different languages. It is a "least common denominator" font - the glyphs will generally be there, but it generally lacks character and some of the glyphs will look a little weird next to each other.
Upvotes: 2
Reputation: 7970
Usually, that means that the unicode character specified isn't available in that particular font. Try changing fonts to one of the multinational ones, it should go away.
Upvotes: 7