View Single Post
Old 02-19-2013, 08:05 PM   #420
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
I recommend using NiLuJe's port of the Font Hack. It does everything this does plus a lot more:
https://www.mobileread.com/forums/sho...d.php?t=219405

-------------------------------------

I've changed the title of this from Hide Fonts to Font Config. It now includes only one button: Hide Fonts

Purpose: To hide the extra fonts that appear on the Aa menu when USE_ALT_FONTS is present. Refer to:
https://www.mobileread.com/forums/sho...&postcount=424

When Hide Fonts is executed, the following actions take place:
  • The file USE_ALT_FONTS is created if non-existent, allowing custom fonts to be installed.
  • The directory /mnt/us/fonts is created if non-existent.
  • The file /mnt/us/fonts/hidefonts.conf is created and fonts based on the fontlist.txt file are added.
  • The file /mnt/us/fonts/alternate.conf is created if non-existent, and is used for other user font configurations.

Once these files are created, the user is free to edit them at will; use a UNIX-friendly editor. The use of the Font Config KUAL button is no longer necessary to hide additional fonts. However, if you do intend to add or remove hidden fonts with KUAL, ensure other font configurations are added to alternate.conf as hidefonts.conf will be overwritten each time the KUAL button is used.

** Tested on the Kindle Touch 5.3.2 and Paperwhite 5.3.3 **


Instructions:
Spoiler:
Previous users of Hide Fonts or Font Config, remove the hideFonts or fontconfig folder(s) from the extensions folder on your Kindle.

Drag the fontconfig folder from the ZIP archive to the extensions folder.

The file extensions/fontconfig/fontlist/fonts.txt includes all the extra fonts that appear when the USE_ALT_FONTS file is present. All fonts in the list will be hidden. If you need any of those fonts to appear on the Aa dialogue, simply remove them from the list. This list can be edited with any Unix-friendly editor such as Notepad++.

Launch KUAL and select "Font Config : Hide Fonts". A restart is necessary.

If you want to restore the hidden fonts, delete hidefonts.conf from the fonts directory or edit it directly as needed. Also, you can use this button to simply enable the alternate.conf file as explained above. You can use this as a one-shot deal: Install, Hide Fonts, remove from extensions. In the future, whatever configurations you need can be placed in alternate.conf.


Example alternate.conf:
Spoiler:
Code:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

 <!-- Change default monospace font -->
  <match target="pattern">
    <test qual="any" name="family"><string>KindleBlackboxC</string></test>
    <edit name="family" mode="assign"><string>DejaVu Sans Mono</string></edit>
  </match>

</fontconfig>


For more information about fontconfig files, see:
http://freedesktop.org/software/font...nfig-user.html

Thanks to DuckieTigger and twobob for suggestions and support.
Attached Files
File Type: zip fontconfig.zip (4.4 KB, 1285 views)

Last edited by JimmyR; 01-13-2014 at 01:50 PM. Reason: Update Instructions
JimmyR is offline   Reply With Quote