View Single Post
Old 06-20-2023, 11:14 PM   #1037
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,706
Karma: 16308824
Join Date: Sep 2022
Device: Kobo Libra 2
I got tired of the way the font menu has sliders that give no indication of what the actual values are for each font setting, so I wrote a small script to gather this information from Kobo eReader.conf. Note that your font settings are saved across books, and changing books does not immediately update the contents of Kobo eReader.conf, so the script may provide outdated information if you switch between books and then invoke the script before using the font menu to adjust anything.

A screenshot of the script output is attached below.

Code:
# Typography Settings Aggregator 1.0 (2023-06-20) by Aleron Ives
#
# This script aggregates typography settings for Kobo e-readers,
# since the font menu doesn't tell you what the actual numbers are.
# Be sure the various typography settings are present in Kobo eReader.conf
# before using this script, as most settings are not written to the
# configuration file until you modify them at least once.
#
# You can use NickelMenu to invoke this script like so:
# menu_item :reader :Typography :cmd_output :500 :/mnt/onboard/.adds/fontcheck.sh

# Gather the typography settings

font=$(grep FontFamily "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)
size=$(grep FontSize "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)
weight=$(grep FontWeight "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)
spacing=$(grep LineHeight "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)
lmargin=$(grep LeftMargin "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)
rmargin=$(grep RightMargin "/mnt/onboard/.kobo/Kobo/Kobo eReader.conf" | cut -d= -f2)

# Format and display the results

echo Font: $font
echo Size: $size
echo Weight: $weight
echo Spacing: $spacing
echo Margins: $lmargin, $rmargin
Attached Thumbnails
Click image for larger version

Name:	fontcheck.png
Views:	308
Size:	26.6 KB
ID:	202181  
Aleron Ives is offline   Reply With Quote