Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2014, 04:28 AM   #1
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Cool Code2000 font editing help

Hi friends,

K4 uses the Code2000 font to render all the unicode glyphs, including Devanagari. This font is adequate but is quite ugly as can be seen in the attached image.

K4 does not allow the installation of any alternative unicode fonts for a specific unicode range like Devanagari.

I want to do this:
  1. Edit the Code2000 font to remove all the existing Devanagari glyphs.
  2. Insert the Devanagari glyphs from Noto Sans Devanagari font into the Code2000 font.

The problem is complicated by the fact that unicode Devanagari fonts contain a lot of hidden information on how to handle ligatures. Every Devanagari font has it's own custom hidden information.

I am looking for friends who have the requisite font editing skills to solve this problem.

Thanks.
Attached Thumbnails
Click image for larger version

Name:	1.GIF
Views:	356
Size:	30.0 KB
ID:	132307  
geekyworld is offline   Reply With Quote
Old 12-11-2014, 05:38 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Depending on your firmware, you might save yourself the hassle of editing code2000.ttf by installing a font hack. What are the first 4 digits of your serial number and the firmware version installed on your Kindle?
Doitsu is offline   Reply With Quote
Old 12-11-2014, 06:09 AM   #3
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Thanks for your reply Doitsu.
My firmware version is: 4.1.1 (1813030025)
geekyworld is offline   Reply With Quote
Old 12-11-2014, 06:28 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by geekyworld View Post
Thanks for your reply Doitsu.
My firmware version is: 4.1.1 (1813030025)
Looks like you have a (non-touch) K4. Try installing NiLuJe's jailbreak and fonthack packages (under Packages targeting the Kindle 2/DX/DXG/3/4).

You'll need to use 7Zip to unpack the .xz files. Open the .xz file with 7Zip, then double-click the .tar file and extract it to your machine. Follow the instructions in the readme.txt file.

For more detailed jailbreak information see also the Wiki.

Last edited by Doitsu; 12-11-2014 at 09:48 AM.
Doitsu is offline   Reply With Quote
Old 12-11-2014, 06:45 AM   #5
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Please clarify, how will a font hack help?

I could have simply renamed noto sans as code2000.ttf and got good Devanagari text.
But then what if a book contains other unicode characters? They will not be displayed correctly.

Also Arial unicode can be renamed as code2000.ttf but it's Devanagari glyphs are too thin and not suitable for low-res screens like K4. Noto Sans is thick & custom built for mobile screens.

Another possible solution could be to get a Noto font that covers the whole unicode range. I'm looking for this but have not been able to find it yet.
geekyworld is offline   Reply With Quote
Old 12-11-2014, 08:01 AM   #6
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by geekyworld View Post
Please clarify, how will a font hack help?
Because if you insist on ignoring the years of effort and experience that went into gaining control of the Kindle fonts, you will:
*) At a minimum, never get satisfactory results for the effort you spend;
*) Most likely, end up with a bricked K4 that you can sell for spare parts on e-bay.

My advice:
Read the entire spoiler for the legacy devices font hack;
Install it;
Adjust per directions;
**THEN** If you don't like the result, consider editing up your own bastardized font - trying not to brick the Kindle's font rendering engine in the process.
knc1 is offline   Reply With Quote
Old 12-11-2014, 11:11 AM   #7
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
knc1...language!

I've installed the font hack many times before & every time I uninstalled it in a hurry. I do not like any of the fonts in the new look and configuring the hack is *very* inconvenient. I'm quite satisfied with the default K4 fonts except the Devanagari font.

Of course there are safety concerns, but I'd never install the edited font without testing it thoroughly.

I feel the editing can be done if the person is an expert on fonts. I'm looking for just such a person.
geekyworld is offline   Reply With Quote
Old 12-11-2014, 11:23 AM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by geekyworld View Post
knc1...language!
There's nothing "language!" about the word "bastardize" - it's a perfectly normal word, acceptable in even the most polite society, and meaning "to lower in value" or "debase".
HarryT is offline   Reply With Quote
Old 12-11-2014, 08:30 PM   #9
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Quote:
Originally Posted by HarryT View Post
There's nothing "language!" about the word "bastardize" - it's a perfectly normal word, acceptable in even the most polite society, and meaning "to lower in value" or "debase".
The B word is ok? The western "culture" never ceases to amaze! If this font ever sees the light of the day we can call it BObama :)) (the best B* combination of east & west).

Now back to business. The font hack also is not the perfect solution to my problem. It does not provide for any way of installing a separate font for the Devanagari script. It only makes it easier to install/uninstall fonts, since the fonts folder is in the root directory.

Last edited by geekyworld; 12-11-2014 at 08:34 PM.
geekyworld is offline   Reply With Quote
Old 12-11-2014, 09:45 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by geekyworld View Post
The B word is ok? The western "culture" never ceases to amaze! If this font ever sees the light of the day we can call it BObama ) (the best B* combination of east & west).
"bastardize" is not the B-word, otherwise you'd be right.

http://lmgtfy.com/?q=bastardize -- synonyms: distort, dilute, weaken, contaminate, etc.
http://lmgtfy.com/?q=bastard


In a similar vein, see the disambiguation page for "bitch" on Wikipedia -- which might be an acceptable word if we were at a dog show... (see first reference listed)


You can probably put it down to English being a crazy language, according to many non-native English speakers.
Probably still best to double-check, if someone tells you it is acceptable in the most polite of societies. They might NOT be out of their mind.

Last edited by eschwartz; 12-11-2014 at 09:54 PM.
eschwartz is offline   Reply With Quote
Old 12-12-2014, 09:04 AM   #11
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Problem still not solved. Font hack is not the solution since it has no special provision for Devanagari fonts.
geekyworld is offline   Reply With Quote
Old 12-12-2014, 10:53 AM   #12
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@geekyworld: It might not be as user-friendly (and I use that lightly, because the K5 version isn't terribly user-friendly either ;p) as on FW 5.x, but yes it does. For Mobi7 documents, the I18N font explicitly replaces Code2000. For KF8, it's placed earlier in the priority list than Code2000, so *should* get picked up over Code2000 no matter what.

If you don't care about the default overrides, it's as simple as using the backups made to restore Caecilia as the Serif font & Helvetica as the Sans one.

On KF8 documents, the usual complex script shaping issues may apply, I don't remember how FW 4.x behaves on that front. (Also no idea if this applies to your target script anyway ^^).

EDIT: To clarify something Doitsu brought up in a PM, replacing code2000 is indeed a bad idea, first and foremost, because if the FW chokes on it, you're screwed, but even if it doesn't, because that wouldn't help w/ KF8 documents, because of the whole fontconfig stack involved (you'd need either to update the fc config, or tweak the font's family name, and update the fc cache. Which is precisely what the Hack handles behind the scenes).

Last edited by NiLuJe; 12-12-2014 at 12:01 PM.
NiLuJe is offline   Reply With Quote
Old 12-16-2014, 01:19 AM   #13
geekyworld
Enthusiast
geekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the endgeekyworld knows the complete value of PI to the end
 
Posts: 32
Karma: 31582
Join Date: Apr 2013
Device: kindle
Thumbs down

@NiLuJe Thanks for your detailed reply. It turns out that I18N font uses the exact same Devanagari glyphs as Code2000! So, Devanagari text looks exactly the same even after installing the font hack. View the attachment for evidence.

I'm really fed up of this and am closing this thread. I don't know about other devices but I think Indians should not go for Kindle because of the poor INDIC support and ugly fonts. I'll think twice about buying an Amazon product again. Bookshops should not get into the computer business in the first place. Bastardization of the first order!
Attached Thumbnails
Click image for larger version

Name:	screen_shot-63607.gif
Views:	247
Size:	37.4 KB
ID:	132540  
geekyworld is offline   Reply With Quote
Old 12-16-2014, 03:42 AM   #14
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
So author something you think is better:
http://designwithfontforge.com/en-US...Typefaces.html
knc1 is offline   Reply With Quote
Old 12-16-2014, 03:46 AM   #15
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
I think the suggestion was to use the font hack to facilitate the font configuration/replacement - not that the font hack alone will provide remedy of the underlying issue, i.e. available fonts being ugly.

As far as I can see, the font hack allows customization of the fontconf library used by the Kindle framework? (@Niluje?) So you can fine-tune when to use what font. Refer to the fontconfig documentation as for how to do that.

Granted, Indians should not go for Kindles when the fonts provided are ugly and it needs developer skills to remedy that situation. On the other hand, you should probably complain to Amazon, not to the group of developers in this forum.
hawhill is offline   Reply With Quote
Reply

Tags
code2000, devanagari, kindle 4, noto sans devanagari, unicode


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font hack to replace code2000.ttf? Doitsu Kindle Developer's Corner 13 06-10-2014 02:53 PM
editing a book, more than one colored font? 20Gt Editor 3 12-28-2013 11:51 AM
Touch Change font by editing ePub CSS ExOblivione Barnes & Noble NOOK 8 12-25-2012 12:48 AM
When will Kindle use code2000 font? linshi Kindle Developer's Corner 0 07-12-2011 01:50 AM
HELP: any way to use a strike-out font when editing posts? nrapallo Feedback 7 03-03-2011 03:23 PM


All times are GMT -4. The time now is 10:30 PM.


MobileRead.com is a privately owned, operated and funded community.