importsfromgooglecode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Use font-face for Chess Alpha diagrams #678

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Judging from http://www.fonts2u.com/chess-alpha.font the Chess Alpha font is 
fine to use from font-face, so users don't need it installed to print diagrams.
Judging from https://bugzilla.mozilla.org/show_bug.cgi?id=668174 this will even 
solve the firefox rendering problem.
We can upload it to pychess.org for server.

Original issue reported on code.google.com by lobais on 29 Jun 2011 at 8:04

GoogleCodeExporter commented 9 years ago

Original comment by lobais on 7 Jul 2011 at 11:10

GoogleCodeExporter commented 9 years ago
I do not understand. We use images in diagrams, I believe, not fonts.

Original comment by G.nius...@gmail.com on 27 Jun 2013 at 3:12

GoogleCodeExporter commented 9 years ago
This is for "Save As" -> "Html".
Actually that should now be moved to Export.

Original comment by lobais on 27 Jun 2013 at 3:56

GoogleCodeExporter commented 9 years ago
Forget the last comment. I forgot we actually try to open html files.

Original comment by lobais on 27 Jun 2013 at 4:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Okay, changed font to Chess Alpha. 
https://G.nius.ck@code.google.com/r/gniusck-fontfix/  (Of course, it didn't 
quite work right on my computer to begin with. I fixed one bug, but the file 
needs to be tested I believe.)

Original comment by G.nius...@gmail.com on 28 Jun 2013 at 4:55

GoogleCodeExporter commented 9 years ago
1. I think the Chess Alpha 2 font was OK, no need to change it to Chess Alpha.

2. The loadToModel() function is broken too. It uses the old(removed) 
addPiece() of Board class, but we have only _addPiece() in LBoard class from a 
while. Maybe we should just save the FEN string into the .html too, then 
parsing code can be eliminated, and just add the FEN as setup parameter on 
board instantiation. 

3. Another problem that moves are saved, but not loaded at all. If it's a 
position saver only, why list moves in .html? If it's a game saver, we should 
load moves too, shouldn't we?

Original comment by gbtami on 28 Jun 2013 at 6:48

GoogleCodeExporter commented 9 years ago
To be honest I think the loading feature was a dumb idea from the beginning. I 
think it was only added because we will didn't have the concept of an exporter, 
so "why not".
I say let's just remove loading capacity. People can copy paste the moves into 
the so designed dialog.

Original comment by lobais on 28 Jun 2013 at 6:52

GoogleCodeExporter commented 9 years ago
It seems a bit like the image export, except buggier.

Original comment by G.nius...@gmail.com on 28 Jun 2013 at 7:00

GoogleCodeExporter commented 9 years ago
Well, it works better for print, includes moves, and let's you combine many 
games into one sheet. Very useful for teachers e.g.

Original comment by lobais on 28 Jun 2013 at 7:02

GoogleCodeExporter commented 9 years ago
Agreed. Treating it as an exporter seems more logical. Maybe we should split 
the Savers dir into Savers and Exporters (png.py and chessalpha2.py).

Original comment by gbtami on 28 Jun 2013 at 7:10

GoogleCodeExporter commented 9 years ago
That or just test if the saver has a load method. Right now I noticed the 
exporting dialog is done inside the png saver, which is a bit messy. An ionest 
function would be better.
All if this is not really related to this bug though.

Original comment by lobais on 28 Jun 2013 at 7:16

GoogleCodeExporter commented 9 years ago
Btw. the original rendering problem (empty fields) still exist. Should we 
upload the font to pychess.org? (But I don't know the font-face syntax how to 
use it from an url)

Original comment by gbtami on 28 Jun 2013 at 7:18

GoogleCodeExporter commented 9 years ago
Unfortunately @font-face doesn't work for me with Firefox 21.0 at all. But it 
works with Midori if I omit local src. Hmm.

Original comment by gbtami on 1 Jul 2013 at 10:36

GoogleCodeExporter commented 9 years ago
The FF problem is cross-site HTTP reques:
https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS?redirectlocale
=en-US&redirectslug=HTTP_access_control

The solution is here:
http://www.cssbakery.com/2010/07/fixing-firefox-font-face-cross-domain_25.html

Original comment by gbtami on 3 Jul 2013 at 9:37