Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 09-24-2020, 04:59 AM   #1
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Thumbs up KOReader and Fonts

Hello KOReader readers.

I would like to learn something about font management in KOReader. For example, I would like to use "Vollkorn".

http://vollkorn-typeface.com/
http://vollkorn-typeface.com/downloa...korn-4-105.zip

in the TTF folder of the zip file are the following files:

Code:
Vollkorn-Black.ttf
Vollkorn-BlackItalic.ttf
Vollkorn-Bold.ttf
Vollkorn-BoldItalic.ttf
Vollkorn-ExtraBold.ttf
Vollkorn-ExtraBoldItalic.ttf
Vollkorn-Italic.ttf
Vollkorn-Medium.ttf
Vollkorn-MediumItalic.ttf
Vollkorn-Regular.ttf
Vollkorn-SemiBold.ttf
Vollkorn-SemiBoldItalic.ttf

I have created the folder /koreader/fonts/vollkorn. How do I name the files? Or should KOReader automatically recognize regular, bold, italic etc.?

https://github.com/koreader/koreader/wiki/Fonts

Does not answer the questiion
Winkelschraube is offline   Reply With Quote
Old 09-24-2020, 05:08 AM   #2
elvvis
Member
elvvis began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jan 2019
Device: PW4, tolino epos 2
They should be recognized if you copy them into the koreader/fonts directory without subdirectory.
elvvis is offline   Reply With Quote
Advert
Old 09-24-2020, 06:45 AM   #3
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Smile

They can also be in folders, does not matter. See also the readme.md in the /koreader/fonts folder.

The question is rather about the naming. If I copy all files into one folder superbold will be activated automatically. If I then select bold in KOReader, the font becomes a little bit thinner.

If I have only "Vollkorn-Regular.ttf" in the folder, the font is displayed normally.
Winkelschraube is offline   Reply With Quote
Old 09-24-2020, 08:15 AM   #4
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Substyles are not supported. Only the four standard ones are.

So, generally, you'll want Regular, Bold, Italic & BoldItalic.

You *might* be able to actually use a different "base" weight (i.e., Thin or Medium instead of Regular), but it *might* require mangling the metadata and/or filenames.

----

What currently happens is that CRe walks over your folder in inode order, finds the first 4 fonts in a matching family, tries to figure out which is which (and generally fails for !Regular base weights), and calls it a day.
Since, instead of 4 exact styles, you have a crapload of stuff in there, you get a "controlled" random result ^^.
Check your crash.log, it'll be spouting quite a few warnings about discarding fonts.

Last edited by NiLuJe; 09-24-2020 at 08:19 AM.
NiLuJe is offline   Reply With Quote
Old 09-24-2020, 04:37 PM   #5
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Much nicer recap of my half-assed "you might be able to do that" answer, thanks to @poire-z:

https://github.com/koreader/koreader...ment-698520071
NiLuJe is offline   Reply With Quote
Advert
Old 09-27-2020, 02:17 AM   #6
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Smile

Thank you very much, and to poire-z of course!!!. I now only have four files in the folder /koreader/fonts/vollkorn:

Code:
Vollkorn-Bold.ttf
Vollkorn-BoldItalic.ttf
Vollkorn-Italic.ttf
Vollkorn-Regular.ttf
And it works. Did I get it right, the fonts are recognized by the "font weight metadata", or by the file order? And KOReader can only recognize the four, otherwise something unpredictable happens.

How works bold, italic... if only the "regular" file is there? Is it calculated by KOReader from regular and is it more accurate with the corresponding files?
Winkelschraube is offline   Reply With Quote
Old 10-01-2020, 10:01 AM   #7
Incanus
Incanus
Incanus doesn't litterIncanus doesn't litterIncanus doesn't litter
 
Incanus's Avatar
 
Posts: 275
Karma: 210
Join Date: Oct 2017
Location: Chile
Device: Boyue Likebook T80D
I've tried and checked many times: the only file needed is the -regular one.

KO Reader works out the bold, italic and bold+italic by itself.

Kind regards

Enviado desde mi SM-G950F mediante Tapatalk

Last edited by Incanus; 10-03-2020 at 07:30 AM.
Incanus is offline   Reply With Quote
Old 10-02-2020, 10:54 AM   #8
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Smile

Quote:
Originally Posted by Incanus View Post
I've tried and checked many times: the only file needed is the <font name>-regular one.

Lobo works out the bold, italic and bold+italic by itself.
Ok, how works this? Is this calculated from the "regular" by KOReader or is everything in the regular file? NiLuJe the KOReader master, what is happening here?


Quote:
Originally Posted by Incanus View Post
Enviado desde mi SM-G950F mediante Tapatalk
Written with my Computer.
Winkelschraube is offline   Reply With Quote
Old 10-02-2020, 11:01 AM   #9
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Winkelschraube: I have no idea what @Icanus is trying to say.

The post from @poire-z I linked to, on the other hand, is *definitely* canonical.
NiLuJe is offline   Reply With Quote
Old 10-03-2020, 07:37 AM   #10
Incanus
Incanus
Incanus doesn't litterIncanus doesn't litterIncanus doesn't litter
 
Incanus's Avatar
 
Posts: 275
Karma: 210
Join Date: Oct 2017
Location: Chile
Device: Boyue Likebook T80D
I put a <font name>-Regular.ttf file on the koreader/fonts/ directory.

After that, I restart KO Reader and it will show the <font name> font as an available font.

If I selected and if the text has them, KO Reader will properly display the different styles, using only the <font name>-Regular.ttf file.

Best regards

Enviado desde mi SM-P350 mediante Tapatalk
Incanus is offline   Reply With Quote
Old 10-03-2020, 07:49 AM   #11
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yes, that's synthesized Bold & Italic.

Which doesn't have much to do with what @Winkelschraube was asking .
NiLuJe is offline   Reply With Quote
Old 10-04-2020, 11:23 AM   #12
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Smile

But that is what I meant in my last question. (09-27-2020, 06:17 AM and 10-02-2020, 02:54 PM)
Winkelschraube is offline   Reply With Quote
Old 10-04-2020, 12:54 PM   #13
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by NiLuJe View Post
Yes, that's synthesized Bold & Italic.
The font layout/rendering engine will compute those based on the Regular outlines. It's obviously not optimal, but it's better than nothing. Bold is obviously less problematic than Italic .
NiLuJe is offline   Reply With Quote
Old 10-04-2020, 02:28 PM   #14
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Is there a way to find out if the file "fontname-bold" is used or if the bold is calculated by "fontname-regular"?
Winkelschraube is offline   Reply With Quote
Old 10-04-2020, 04:09 PM   #15
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,492
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Check the logs, if it's not rejected, it's being used.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting KOReader from CC works only if KOReader was not running before Norbi24 KOReader 7 09-24-2020 12:10 PM
KOReader en français / KOReader in french cramoisi Software 33 04-04-2020 12:14 PM
What are the nicest looking fonts you think would look good on the koreader? lori87 KOReader 32 06-20-2019 08:14 PM
KoReader - fonts BobC KOReader 4 01-04-2019 05:29 AM
How to add alternate fonts without replacing system fonts.(this time this is a guide) techiemonkey Kindle Developer's Corner 17 09-12-2012 04:55 PM


All times are GMT -4. The time now is 07:51 PM.


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