dhowe / ReadersJS

1 stars 4 forks source link

add simplified chinese font to branch shanghai #190

Closed shadoof closed 7 years ago

shadoof commented 7 years ago

@cqx931 Sally could you checkout branch Shanghai and add an appropriate chinese font?

cqx931 commented 7 years ago

https://github.com/dhowe/ReadersJS/pull/191 I have added one Chinese font file, but for better web performance it might be better just using the default Chinese 宋体 if they are available (SimSun for Microsoft and STSong for Mac) http://www.kendraschaefer.com/2012/06/chinese-standard-web-fonts-the-ultimate-guide-to-css-font-family-declarations-for-web-design-in-simplified-chinese/

shadoof commented 7 years ago

Thanks Sally @cqx931, I've merged your pull request into my shanghai branch and the font is downloading to my computer as I write this. Thanks also for the advice above.

If I change the code to point to "image_ch.txt" (simply to make it load and display for now), do you know how to get the readers-app.js to use the STSong (mac default) font when I switch to this text using the interface, or do we have to ask Daniel?

shadoof commented 7 years ago

Or perhaps, for now, as a hack, @cqx931 we could just change the default for all the texts to one of the simplified chinese fonts? (I'm trying to figure out how to do this, but am not yet sure how.)

cqx931 commented 7 years ago

For the canvas, only this line need to be changed to the Chinese font. https://github.com/dhowe/ReadersJS/blob/master/src/multi-page.js#L7 What's your plan for the rest of the page?

Also, I think we still need to load the Chinese Trigram file, but I have no idea how that is generated.

shadoof commented 7 years ago

Thanks @cqx931 Sally, I will have a go and sort out page display. I know the trigrams need to be loaded but I have, I think, a hack for that also.

I have to go out with the poets here now, but hope to find some time to work on this later.

NB: I'm keeping all this on the shanghai branch, in case this isn't obvious.

shadoof commented 7 years ago

@cqx931 Latest commit on shanghai branch will to (broken) display of characters for 'The Image'. My question is: what is the times17.js file with font metrics doing (normally)? Is it applied to the Baskerville?? So I ignore it?

dhowe commented 7 years ago

dont need any font-metrics in the current version

shadoof commented 7 years ago

closing this to open with other shanghai issues