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 01-31-2013, 10:54 AM   #1
xiaoguixp
Junior Member
xiaoguixp began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2012
Device: Kindle Touch
Question Which Config File Controls Font Selection on KT 5.3.2

After upgrading my KT's firmware to 5.3.2, I can see only one font available (黑体) when reading Chinese files. While for English files, three fonts are available (Caecilia, Helvetica and Caecilia Condensed). I want to know which configuration file controls this? How can I add another Chinese font and let the system display it for selection?

I don't want to use the USE_ALT_FONTS method, because all the stock fonts will show up.

In firmware 5.1.2, I could add a config file in /etc/fonts/conf.d directory to intercept the rendering of the three families for English files, like the following example to display custom Chinese font for the Caecilia Regular family:
Code:
   	
<!-- Search for CJK_Serif.ttf and CJK_Serif_Bold.ttf and add them to CJK_Serif_Family -->
<match target="scan">
    <test name="file" compare="eq">
        <string>/mnt/us/fonts/CJK_Serif.ttf</string>
    </test>
    <edit name="family" mode="assign">
        <string>CJK_Serif_Family</string>
    </edit>
    <edit name="style" mode="assign">
        <string>Regular</string>
    </edit>
    <edit name="weight" mode="assign">
        <const>medium</const>
    </edit>
</match>
<!-- scanning Bold font -->
<match target="scan">
    <test name="file" compare="eq">
        <string>/mnt/us/fonts/CJK_Serif_Bold.ttf</string>
    </test>
    <edit name="family" mode="assign">
        <string>CJK_Serif_Family</string>
    </edit>
    <edit name="style" mode="assign">
        <string>Bold</string>
    </edit>
    <edit name="weight" mode="assign">
        <const>bold</const>
    </edit>
</match>


<!-- Intercept the Caecilia Regular family and append the CJK_Serif_Family -->
<match target="pattern">
	<test name="family">
		<string>Caecilia Regular</string>
	</test>
	<edit name="family" mode="append">
		<string>CJK_Serif_Family</string>
	</edit>
	<edit name="family" mode="append">
		<string>Kindle Symbol</string>
	</edit>
</match>
Now the above method no longer works because there is only one font available for selection for Chinese files.

Is there a config file that we can modify to add more font to be displayed?

Last edited by xiaoguixp; 01-31-2013 at 11:13 AM.
xiaoguixp is offline   Reply With Quote
Old 01-31-2013, 11:25 AM   #2
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: 704
Karma: 2290994
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by xiaoguixp View Post
Now the above method no longer works because there is only one font available for selection for Chinese files.

Is there a config file that we can modify to add more font to be displayed?
No, I believe, dialog fonts' enumeration is handled entirely in Java code. I think, you should either use JBPatch to modify Java code so that it would not skip necessary fonts, or use USE_ALT_FONTS and trick to hide unnecessary fonts at Fontconfig level.
eureka is offline   Reply With Quote
Reply

Tags
5.3.2, kindle touch

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fontconfig error: Cannot load default config file krischik Calibre 4 02-17-2012 09:48 AM
Win7/Mac Config file...?? Cpl Punishment Calibre 2 01-19-2011 07:30 PM
Editing config file James_Wilde Sigil 4 12-11-2010 10:22 AM
Fontconfig error: Cannot load default config file kdbdallas Calibre 11 09-06-2010 05:32 PM
Lost My Very Long Post With Questions About PB 301 Controls vs PB 360 Controls Vienna01 PocketBook 6 06-04-2010 01:51 PM


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


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