Closed
Bug 200147
Opened 22 years ago
Closed 22 years ago
Chess figurine truetype font is not rendered.
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: cesarakg, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
|
402 bytes,
text/html;charset=utf-8
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.3b) Gecko/20021219
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.3b) Gecko/20021219
I'm working on a page with chess games listings, and wanna use some chess
figurine font, like "Chess Komponent Pirat"
(http://www.enpassant.dk/chess/fonteng.htm#PIRAT). The font is showed at other
browser, but not on Mozilla, where is used some default font.
Reproducible: Always
Steps to Reproduce:
1. Download and install the "Chess Komponent Pirat" TrueType font
(http://www.enpassant.dk/chess/fonteng.htm#PIRAT)
2. Create a HTML sample page with somethink like it:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Teste</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<span style="font-family: Chess Komponent Pirat;">
torre = rook = R<br>
cavalo = knight = N<br>
bispo = bishop = B<br>
dama = queen = Q<br>
rei = king = K
</span>
</body>
</html>
3. View it.
Actual Results:
It shows:
torre = rook = R
cavalo = knight = N
bispo = bishop = B
dama = queen = Q
rei = king = K
Expected Results:
On the caps, it should have shown the small gliphs of the font.
| Reporter | ||
Comment 1•22 years ago
|
||
Before you can use this file, you must install the truetype font first.
Comment 2•22 years ago
|
||
Sounds like the "symbol font" thing to me... (and Mozilla's rendering is correct
then).
Comment 3•22 years ago
|
||
To use chess symbols, you have to use the correct UNICODE codepoints, namely:
@ Chess symbols
2654 WHITE CHESS KING
2655 WHITE CHESS QUEEN
2656 WHITE CHESS ROOK
2657 WHITE CHESS BISHOP
2658 WHITE CHESS KNIGHT
2659 WHITE CHESS PAWN
265A BLACK CHESS KING
265B BLACK CHESS QUEEN
265C BLACK CHESS ROOK
265D BLACK CHESS BISHOP
265E BLACK CHESS KNIGHT
265F BLACK CHESS PAWN
See: http://www.unicode.org/charts/PDF/U2600.pdf
You can see some of the characters here:
torre = rook = ♖
cavalo = knight = ♘
bispo = bishop = ♗
dama = queen = ♕
rei = king = ♔
I'll attach a test case showing how you can use these symbols in your page.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Comment 4•22 years ago
|
||
It seems there's a bug in Bugzilla, it didn't render the chess pieces right
above. It works for me in this test case.
Attachment #119091 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #119094 -
Attachment mime type: text/html → text/html;charset-utf-8
Updated•22 years ago
|
Attachment #119094 -
Attachment mime type: text/html;charset-utf-8 → text/html;charset=utf-8
Comment 5•22 years ago
|
||
You can also use numeric character references like this to refer to the
characters if you don't want to use UTF-8 as I did in the file I attached:
torre = rook = ♖
cavalo = knight = ♘
bispo = bishop = ♗
dama = queen = ♕
rei = king = ♔
| Reporter | ||
Comment 6•22 years ago
|
||
What's the problem with using the TrueType font "Chess Komponent Pirat"? If i'm
using it, I have one advantage: if the figurines doesn't renders, as in the
Mozilla case, I steel have a readable chess game listing. That's not the case
with the UNICODE solution.
| Reporter | ||
Comment 7•22 years ago
|
||
Sorry bad engrish.
Comment 8•22 years ago
|
||
You can use the font (indeed, in the test file I attached, I explictly specify
the font, so if it is correctly encoded, the right glyphs will be used).
What is wrong is specifying the UNICODE character for "LATIN UPPERCASE R" and
expecting it to render as something other than a latin uppercase R. Mozilla is
very careful to follow the specifications here: if you ask for an "R", you will
get an "R". regardless of whether the first choice font has an "R" in it or not.
The font you mentioned does not have an "R" character in it.
(Based on my quick, inexpert examination of the font file, it appears that it
does not contain any UNICODE glyph mapping tables, and therefore Mozilla is
unlikely to do anything with it, as it presumably cannot work out what
characters map to what glyphs.)
| Reporter | ||
Comment 9•22 years ago
|
||
Disclaimer: Sorry the bad engrish.
The purpose of having a chess figurine font is that a game notation usually uses
national characters for the chess pieces. For example, the rook, in an english
chess game listing, is "R". In portuguese, the "R" represents the king. The
solutin in modern chess books is to use little pictures of the pieces, what is
called "figurine notation". If I want to write a book on chess, I will use a
chess figurine font, and write down the game using the english notation.
The only purpose of a chess figurine font is to write down the chess games, so
it's acceptable that an "R" renders like a chess rook, instead of the "R"
letter. In fact, some chess figurine fonts have only glyhs, not letters.
The example you provided doesn't works with all the two browsers I tested
(Mozilla1.3b and IE5.5). Instead of chess figurines, it renders "?". Maybe it's
a problem of Win2K.
The example I provided works with IE5.5, but doesn't works with Mozilla. Instead
of showing the chess figurine font, it uses Times Roman. I was expecting that
Mozilla makes use of the font, but it seems that it's not the case. I'm
upgrading to 1.3 final, and will make the test again.
Comment 10•22 years ago
|
||
> The only purpose of a chess figurine font is to write down the chess games, so
> it's acceptable that an "R" renders like a chess rook, instead of the "R"
> letter.
Then the font should claim that the corresponding glyph is a Unicode "R"
character. This font does not. This font assumes that the font user is not
Unicode-aware and will simply use the ASCII value of "R" to index directly into
the font table. Anything that does so will indeed work with this font, but will
fail miserably with actual Unicode fonts.
In other words, that font file is broken, if its purpose is to do what you suggest.
You need to log in
before you can comment on or make changes to this bug.
Description
•