Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-25-2012, 06:59 AM   #421
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,742
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
bold mine:
Quote:
Originally Posted by Stino View Post
First I not even realized that 5.3.1 was installed and fonts were still working. Than I copy a new font family to /mnt/us/fonts and restart my device because I assume new fonts are only detected during starting. But after restart all personal fonts were gone. So I delete the new font family only and do again a restart, but fonts were still gone. Than I try to start the coolreader without success and realized that the jailbreak were not working anymore? Now I checked the firmware version and see that amazon updated it from 5.3.0 to 5.3.1 without asking me. So I try the ";fc-cache" command, than I reboot, nothing. Again this ";fc-cache" command and wait 12 minutes (no automatic reboot happen?) and again I reboot, and again no personal fonts working.

Now I reinstall the jailbreak with all needed steps(a few reboots) and get my coolreader back to running, but the standard reader still not uses personal fonts. Finally I install the JBPatch together with font size hack and after another reboot, I saw all my fonts in "Aa" menu and was happy. I guess the are working now because of the JBPatch. That seems to fix something. For sure I did more than enough reboots. For each font at least one.
It is definately not the JBPatch. I just tried it out on a jailbroken 5.3.1 that other than the jailbreak itself only ever had (and has) jailbreak, kindlet jailbreak, developer certificates, and Collection Manager installed. JBPatch never touched that one, but after copying USE_ALT_FONTS file and a restart, it does show now the extended list of fonts (nothing in fonts/ folder itself though did not create that).

So still not clear to me what all is needed for it to work on 5.3.1.
DuckieTigger is offline   Reply With Quote
Old 12-25-2012, 10:28 AM   #422
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by DuckieTigger View Post
No offence, but that was prior to 5.3.1 - why the trouble of it working not as easy in 5.3.1 as it did in 5.3.0? Did something change? Some code break that Amazon does not care about?
I don't know. I didn't bother to look inside 5.3.1 USE_ALT_FONTS handling code, as Java code in PW firmware is horribly obfuscated and no joy (more precisely, it's complete nightmare) to work with. If it doesn't work at all, then so be it.

However, mentioning of requirement of full system restart and JBPatch installing is scaring me. They are certainly not required at all. This method is not a black magic based on random actions, it has solid technical foundation, so, please, don't spread any myths springing from anecdotal case (it's a message to the general public).
eureka is offline   Reply With Quote
Old 12-27-2012, 06:28 PM   #423
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
^ what eureka said.

JBPatch has absolutely nothing to do with this. In fact, even the font hack application has nothing to do with it either (and it's for Kindle Touch only, anyway). In newer Paperwhite firmwares, all of the magic is entirely contained in the original Amazon code.
ixtab is offline   Reply With Quote
Old 12-28-2012, 01:16 AM   #424
RogueLeader
Junior Member
RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.
 
Posts: 2
Karma: 41620
Join Date: Dec 2012
Device: KPW
Quote:
Originally Posted by alfaifi View Post
Yes, that solved it and also brought too many fonts. Thanks.
Quote:
Originally Posted by DuckieTigger View Post
It is not too many fonts. It is some fonts that the Kindle comes with automatically. You still have room for a lot of custom fonts on the PW. Here is a screenshot of my font-selection. The fonts I added myself are: arial, consolas, constantia, georgia, minion, tektron, times, and trebuchet.

You could theoretically add 2 more, but then it is hard to see and push the line spacing and margin buttons at the bottom. All the other fonts that showed up will show up if only USE_ALT_FONTS is there, but no fonts are in fonts folder.
For KPW, 5.3.1, my workaround for curbing the display of the additional stock fonts is to create /etc/fonts/local.conf with the following content:

Code:
<rejectfont>
	<pattern>
		<patelt name="family">
			<string>Song S</string>
		</patelt>
	</pattern>
	<pattern>
		<patelt name="family">
			<string>MKai PRC</string>
		</patelt>
	</pattern>
	<pattern>
		<patelt name="family">
			<string>TBMincho</string>
		</patelt>
	</pattern>
	<pattern>                
		<patelt name="family">   
			<string>TBGothic</string>  
		</patelt>                  
	</pattern>                 
	<pattern>                  
		<patelt name="family">     
			<string>HYGothic</string>   
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>HYMyeongJo</string> 
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>MYing Hei T</string>
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>Song T</string>               
		</patelt>                             
	</pattern>             
	<pattern>                   
		<patelt name="family">      
			<string>MYing Hei S</string>
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>MT Chinese Surrogates</string>
		</patelt>                             
	</pattern>                            
</rejectfont>
You can add or remove fonts to this file as desired.

There is probably a more elegant solution, as I just scratched the surface of fontconfig to do this, but it worked for me. It allows for the Aa dialog to fit more custom fonts if that is your desire. I just like the fact that the box is once again small enough that you can see the text above/below, thus getting a live preview of your settings.
RogueLeader is offline   Reply With Quote
Old 12-28-2012, 05:52 AM   #425
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,742
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
Quote:
Originally Posted by RogueLeader View Post
For KPW, 5.3.1, my workaround for curbing the display of the additional stock fonts is to create /etc/fonts/local.conf with the following content:

Spoiler:
Code:
<rejectfont>
	<pattern>
		<patelt name="family">
			<string>Song S</string>
		</patelt>
	</pattern>
	<pattern>
		<patelt name="family">
			<string>MKai PRC</string>
		</patelt>
	</pattern>
	<pattern>
		<patelt name="family">
			<string>TBMincho</string>
		</patelt>
	</pattern>
	<pattern>                
		<patelt name="family">   
			<string>TBGothic</string>  
		</patelt>                  
	</pattern>                 
	<pattern>                  
		<patelt name="family">     
			<string>HYGothic</string>   
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>HYMyeongJo</string> 
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>MYing Hei T</string>
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>Song T</string>               
		</patelt>                             
	</pattern>             
	<pattern>                   
		<patelt name="family">      
			<string>MYing Hei S</string>
		</patelt>                   
	</pattern>                  
	<pattern>                   
		<patelt name="family">      
			<string>MT Chinese Surrogates</string>
		</patelt>                             
	</pattern>                            
</rejectfont>


You can add or remove fonts to this file as desired.

There is probably a more elegant solution, as I just scratched the surface of fontconfig to do this, but it worked for me. It allows for the Aa dialog to fit more custom fonts if that is your desire. I just like the fact that the box is once again small enough that you can see the text above/below, thus getting a live preview of your settings.
Thank you. That looks easy enough - I am a little leery yet as to install usbnetwork - I suppose that is what I need to access the root of all evil ( / ). After all I do spend the majority of my PW time reading instead of fiddling with it. I would hate to be responsible for breaking my Kindle by changing or deleting the wrong file.

I'll keep this in mind though. As for stock fonts - I rather do like MT Chinese Surrogate - it is a nice heavy font (at least when reading english with it). Having the live preview back would definately be a plus if changing fonts often.

update: Finally got around to get rid of them. Looks a lot better this way

Last edited by DuckieTigger; 01-01-2013 at 01:04 AM.
DuckieTigger is offline   Reply With Quote
Old 12-29-2012, 01:31 AM   #426
RogueLeader
Junior Member
RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.RogueLeader is an enigma wrapped up in a mystery.
 
Posts: 2
Karma: 41620
Join Date: Dec 2012
Device: KPW
Quote:
Originally Posted by DuckieTigger View Post
Thank you. That looks easy enough - I am a little leery yet as to install usbnetwork - I suppose that is what I need to access the root of all evil ( / ). After all I do spend the majority of my PW time reading instead of fiddling with it. I would hate to be responsible for breaking my Kindle by changing or deleting the wrong file.

I'll keep this in mind though. As for stock fonts - I rather do like MT Chinese Surrogate - it is a nice heavy font (at least when reading english with it). Having the live preview back would definately be a plus if changing fonts often.
Re: reading vs fiddling. I hear you. But I just got mine for Christmas so I am still in full fiddle mode. Maybe I'll read something one of these days!

Indeed, I should have mentioned you need to be jailbroken with usbnet to access /. And yes, please exercise caution and only do what you're comfortable doing (the usbnet guides preach this clearly enough). That said, my solution doesn't delete or change existing files, but creates a new config file (similar to others already there) with rules for which fonts running programs (e.g. the reading application) can "see".

I'll re-enable MT Chinese Surrogates, based on your rec. I didn't even try it, I just didn't like how the name was too long to be displayed in full. I'm picky like that, although I think I could write config rules to shorten the name up...
RogueLeader is offline   Reply With Quote
Old 01-12-2013, 09:57 PM   #427
fezley
Junior Member
fezley began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2011
Device: none
Quote:
Originally Posted by DuckieTigger View Post
Thank you. That looks easy enough - I am a little leery yet as to install usbnetwork - I suppose that is what I need to access the root of all evil ( / ). After all I do spend the majority of my PW time reading instead of fiddling with it. I would hate to be responsible for breaking my Kindle by changing or deleting the wrong file.

I'll keep this in mind though. As for stock fonts - I rather do like MT Chinese Surrogate - it is a nice heavy font (at least when reading english with it). Having the live preview back would definately be a plus if changing fonts often.

update: Finally got around to get rid of them. Looks a lot better this way
Is it possible to get rid of the extra stock fonts that appear without jailbreaking? I love that I can add fonts but I don't love having to look at a huge list of fonts I know will never get used.
fezley is offline   Reply With Quote
Old 01-13-2013, 12:11 AM   #428
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,742
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
Quote:
Originally Posted by fezley View Post
Is it possible to get rid of the extra stock fonts that appear without jailbreaking? I love that I can add fonts but I don't love having to look at a huge list of fonts I know will never get used.
No w/o jailbreak and access to root partition you cannot disable the extra stock fonts. Well there is one way: delete USE_ALT_FONTS file and restart. You won't see your own customs fonts then either though.

Last edited by DuckieTigger; 01-13-2013 at 12:15 AM.
DuckieTigger is offline   Reply With Quote
Old 01-14-2013, 06:28 PM   #429
rdwilliamson
Junior Member
rdwilliamson began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2013
Device: kindle touch
Help

I am floundering here.

Decided to add some fonts to my kindle touch. It is running the latest update.

Made a empty file through notepad - USE_ALT_FONTS.txt

made my font folder in root directory. added a font. all four that i needed.

Tried the ;fc-cache thing and restarting with no results.
rdwilliamson is offline   Reply With Quote
Old 01-14-2013, 06:34 PM   #430
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
USE_ALT_FONTS, not USE_ALT_FONTS.txt. No file extension.
ixtab is offline   Reply With Quote
Old 01-14-2013, 06:39 PM   #431
rdwilliamson
Junior Member
rdwilliamson began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2013
Device: kindle touch
Got it.

Thank you!!!!

Last edited by rdwilliamson; 01-14-2013 at 06:48 PM.
rdwilliamson is offline   Reply With Quote
Old 01-16-2013, 10:35 PM   #432
rdwilliamson
Junior Member
rdwilliamson began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2013
Device: kindle touch
Couple of questions.

1: The format for naming font files - is it "fontname-Bold" ect. or "fontname_Bold"?
I have seen it both ways.

2: Is there a way to remove or hide some of the extra stock fonts?

Thanks
rdwilliamson is offline   Reply With Quote
Old 01-17-2013, 07:34 AM   #433
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,742
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
@ rdwilliamson: 1 - name the fonts however you like, the real name and style is meta data inside the fontfile.
2 - scroll up to post #424
DuckieTigger is offline   Reply With Quote
Old 01-17-2013, 08:59 PM   #434
xiaoguixp
Member
xiaoguixp began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Aug 2012
Device: Kindle Paperwhite 3
Quote:
Originally Posted by DuckieTigger View Post
@ rdwilliamson: 1 - name the fonts however you like, the real name and style is meta data inside the fontfile.
2 - scroll up to post #424
Could you please elaborate on the first point?
xiaoguixp is offline   Reply With Quote
Old 01-17-2013, 09:42 PM   #435
DuckieTigger
Wizard
DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.DuckieTigger ought to be getting tired of karma fortunes by now.
 
DuckieTigger's Avatar
 
Posts: 4,742
Karma: 246906703
Join Date: Dec 2011
Location: USA
Device: Oasis 3, Oasis 2, PW3, PW1, KT
Quote:
Originally Posted by xiaoguixp View Post
Could you please elaborate on the first point?
Yes. If you have a font (.ttf or .otf) then the relevant information about its name and style (bold, regular, etc) are inside the file. You don't actually see the name of the font or the filename when you go to the aA menu. It shows the font-family (another metadata inside the file). The Kindle is smart enough to read each and every metadata and internally build a structure that says: use xyz.ttf for Arial in regular, use xyzz.ttf for Arial in italics (incase you decided to name them that way). That is for when using USE_ALT_FONTS, when you try to patch the built-in fonts, it needs to be done exactly as the instructions say.

Beware: some fonts do not have their metadata assigned correctly. If you "borrow" fonts from other devices or applications, their regular, bold, italic, bold-italic might not be linked together. So use those at your own risk when throwing them in the fonts folder.

Last edited by DuckieTigger; 01-17-2013 at 09:48 PM. Reason: smallish typos
DuckieTigger is offline   Reply With Quote
Reply

Tags
kindle touch hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Hack for Kindle Touch? Sassapphras Kindle Developer's Corner 1 02-12-2012 09:05 PM
Kindle DXG Font Hack Help rmt Kindle Developer's Corner 0 12-05-2010 01:19 PM
Kindle DX 3G hack font 2.5.5? vebaev Kindle Developer's Corner 1 10-07-2010 06:45 PM
Hacks Kindle font hack ?? badgoodDeb Amazon Kindle 5 07-24-2009 06:18 PM
Kindle 2 Unicode Font Hack Blog Kindle Kindle Developer's Corner 14 04-15-2009 04:55 PM


All times are GMT -4. The time now is 11:34 AM.


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