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

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2019, 01:06 AM   #436
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
I was trying to get Apple's new New York font to work on the Kobo for fun (because why not?) since it's a reading font now used in iBooks, but no matter what I did, it wouldn't render correctly. The internal and external font and family names were correct, the weights were consistent throughout, I tried it with and without PANOSE data but it would always render as italicized.

Long story short, it turns out that "Style Map" in the OS/2 section also needs to be set correctly as well, either to Regular, Italic, Bold, or Bold Italic depending on the font. Apple had set it to Regular across all four font types, and as soon as I edited that section, everything worked.

So just a heads up in case anyone encounters the same issue when working with any other fonts after following all the previous suggestions on how to make this stuff work: Make sure the Style Map section is set correctly too!

Last edited by rtiangha; 12-18-2019 at 01:31 AM.
rtiangha is offline   Reply With Quote
Old 12-20-2019, 05:30 AM   #437
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
FYI, most of the in house Amazon fonts saw updates in the latest Kindle firmware. For example, Bookerly is now at 1.201 up from 1.020 and Amazon Ember is at 1.401 up from 1.010. From what I can tell, many more glyphs have been added.

Now I have a question: Why is it when I edit just the PANOSE data in Fontforge that sometimes the file size of the altered font is many times bigger? For example, stock Bookerly is 259KB but after editing or running sherman's koboify/readify scripts, the file size is over 1MB (disabling things like hinting or kern table has a negligible effect on reducing file size). Am I doing something wrong or is there a setting I'm missing? I'm starting to run into lack of RAM issues due to my insanely large database, so I've had to take out a bunch of fonts that I used to have because with the new Amazon fonts, my Glo HD would reboot whenever I tried to change fonts. Loading the stock font files helped, except they would then render incorrectly because of the incorrect PANOSE weights. Any suggestions on the proper Fontforge settings? Or is there another tool out there that will let me edit just the PANOSE data without regenerating everything?
rtiangha is offline   Reply With Quote
Old 12-20-2019, 06:16 AM   #438
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1202637
Join Date: Sep 2008
Location: Auckland - NZ
Device: Kobo Aura H2O, Kobo Forma
From what I've observed, hinting appears to be one of the big culprits for increasing the font size. I'm not sure, but truetype outlines may also be a bit larger compared to CFF outlines.

The more glyphs, the more hinting, and complex glyphs probably have more hinting than simpler glyphs.

I tend to remove hinting from fonts, because it can cause havoc with eink if the font has been hand-hinted for LCD screens. If you ever come across a font that looks plain bad on eink (I'm talking uneven widths, especially on characters like 'e' or 'c'), chances are it's the hinting.
sherman is offline   Reply With Quote
Old 12-20-2019, 06:23 AM   #439
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
Quote:
Originally Posted by sherman View Post
From what I've observed, hinting appears to be one of the big culprits for increasing the font size. I'm not sure, but truetype outlines may also be a bit larger compared to CFF outlines.

The more glyphs, the more hinting, and complex glyphs probably have more hinting than simpler glyphs.

I tend to remove hinting from fonts, because it can cause havoc with eink if the font has been hand-hinted for LCD screens. If you ever come across a font that looks plain bad on eink (I'm talking uneven widths, especially on characters like 'e' or 'c'), chances are it's the hinting.
Well, I assume Amazon put some work into their hinting to be e-ink optimized so I'd like to keep it if possible, but regardless, shouldn't that data already be included in that stock 300kb? Or am I misunderstanding how the Fontforge hinting option works (the help tip says that new data isn't created and just uses what's already there, and I've disabled auto-generation of hints in the options to ensure it doesn't regenerate anything)?

Edit: And in this case, disabling hinting doesn't have much of an effect on file size; it's still over 1 or 2MB.

Last edited by rtiangha; 12-20-2019 at 06:38 AM.
rtiangha is offline   Reply With Quote
Old 12-20-2019, 06:34 AM   #440
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1202637
Join Date: Sep 2008
Location: Auckland - NZ
Device: Kobo Aura H2O, Kobo Forma
Fontforge is a bit of a mystery I'm afraid

You might want to look at the fonttools package, if all you want to do is change the PANOSE data. You can either use the ttx tool, or figure out how to use the Python library.

Hint, you want the 'OS/2' table. That should contain both the PANOSE data, and the fsSelection (AKA font forge's stylemap) field.

The idea with the ttx tool is it converts the font to an xml representation, you edit the tables in a text editor, then it recreates the font from the xml when you are done.
sherman is offline   Reply With Quote
Old 12-20-2019, 06:45 AM   #441
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
Thanks for the tip! I'll try it.

Also: It could very well be a bug in Fontforge and it's adding its own hinting no matter what you select. At this point, that wouldn't surprise me, lol.
rtiangha is offline   Reply With Quote
Old 12-20-2019, 06:47 AM   #442
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1202637
Join Date: Sep 2008
Location: Auckland - NZ
Device: Kobo Aura H2O, Kobo Forma
Yeah, font forge is.... font forge. One of the main reason I let my font scripts languish.
sherman is offline   Reply With Quote
Old 12-21-2019, 05:30 AM   #443
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
Thanks for the ttx hint; it's EXACTLY what I was looking for. Unlike with Fontforge, I can update PANOSE and name/family data with virtually no impact on file size, which is what I would expect for such simple edits. The one thing I can't figure out is how to update the "Style Map" field in the OS/2 table (maybe it's called something different or lives somewhere else?) so I still use Fontforge for that (it's needed to fix things such as Apple's New York font and Amazon's KindleBlackboxC otherwise they render as italics), but if I could figure out how to do that with ttx, then that'd be good for 98% of my use cases.

Last edited by rtiangha; 12-21-2019 at 05:52 AM.
rtiangha is offline   Reply With Quote
Old 12-21-2019, 05:51 AM   #444
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1202637
Join Date: Sep 2008
Location: Auckland - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by rtiangha View Post
Thanks for the ttx hint; it's EXACTLY what I was looking for. Unlike with Fontforge, I can update PANOSE and name/family data with virtually no impact on file size. The one thing I can't figure out is how to update the "Style Map" field in the OS/2 table (maybe it's called something different or lives somewhere else?) so I still use Fontforge for that (it's needed to fix things such as Apple's New York font and Amazon's KindleBlackboxC otherwise they render as italics), but if I could figure out how to do that with ttx, then that'd be good for 98% of my use cases.
As I mentioned in a previous post, it's called fsSelection. Details from Microsoft here. It should be in the OS/2 table.

Note, it is a bitfield, so will appear as a single number. The main numbers should be:
  • Bit 0 = italic = 1
  • Bit 5 = bold = 32
  • Bit 6 = Regular = 64
  • Bit 0 and 5 = Bold Italic = 32 + 1 = 33

Hopefully I've got those numbers correct!

EDIT: Yep, just checked with the TTLib python library from fonttools. It is the fsSelection attribute/field in the 'OS/2' table. One would hope this is also the case in the ttx export.

Last edited by sherman; 12-21-2019 at 06:08 AM.
sherman is offline   Reply With Quote
Old 12-21-2019, 06:12 AM   #445
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
Ah, I gotcha. And comparing to a set of four fonts I know are correct, those numbers do match (indexed at 0, of course). I wouldn't have been able to figure that out for myself without reading some kind of reference. Thanks! Have you considered using ttx rather than fontforge for your scripts? It might be more reliable?
rtiangha is offline   Reply With Quote
Old 12-21-2019, 06:23 AM   #446
sherman
Fanatic
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 579
Karma: 1202637
Join Date: Sep 2008
Location: Auckland - NZ
Device: Kobo Aura H2O, Kobo Forma
Yeah, thought about it. Might think about it for a quick font fix-up tool. Problem is, it is a much lower level tool, and doesn't have any inbuilt ways to do stuff like auto hinting, auto kerning, glyph weight changing that fontforge provides out of the box.

Not that you can't do any of that with fonttools, but you have to figure out how to do that yourself, and that's waaaaaaay over my head...

EDIT: Looking at the fontTools API reference, removing hints from glyphs looks like it might be fairly easy to do.

Maybe I could create a script that uses fontTools to fix names, PANOSE, fsSelection, and optionally strip hints. No promises though.

Last edited by sherman; 12-21-2019 at 06:36 AM.
sherman is offline   Reply With Quote
Old 12-21-2019, 06:34 AM   #447
rtiangha
Addict
rtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbitrtiangha with a running start, can leap into geosynchronous orbit
 
Posts: 239
Karma: 60749
Join Date: Jul 2016
Device: Kobo Glo HD
Well, to be fair, if people want to do that sort of thing, they could use fontforge, lol.

But a quick tool to get a font to render correctly on a Kobo could have value for others. For me right now, it's a manual process, but outside of font/family name, it's usually the same edits so I'm pretty sure that could be scripted at least. That said, I'm currently reconverting my entire Kobo font collection from the source fonts (well, the ones that originally needed editing at least) and I really am enjoying the space savings. So thanks for the tips!
rtiangha is offline   Reply With Quote
Old 02-03-2020, 03:14 PM   #448
ovinio
Junior Member
ovinio began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Jan 2015
Device: Nook STR
How can make same line spacing (and font size) for a few different fonts, so can easily switch between them without need to adjust line spacing (interlining) and size for individual font.
Using Nook Glowlight 3 and Alreader.

Literata and LiterataBook
Spoiler:
ovinio is offline   Reply With Quote
Old 02-03-2020, 03:20 PM   #449
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 55,497
Karma: 51439670
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Quote:
Originally Posted by ovinio View Post
How can make same line spacing (and font size) for a few different fonts, so can easily switch between them without need to adjust line spacing (interlining) and size for individual font.
Using Nook Glowlight 3 and Alreader.

Literata and LiterataBook
Spoiler:
You would have to find a font editor that allows you to edit the font metrics and figure out the values needed. You could try FontForgre (free) and see if that will do what you want. As to the values, that's something you'll have to figure out for yourself.
JSWolf is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Glo Summary sunny1z Kobo Reader 1 01-18-2013 09:46 AM
Troubleshooting Reading Notes on K3 in Summary sirmaru Amazon Kindle 0 09-26-2010 08:55 PM
book summary in reader coolnamehere Calibre 2 06-06-2010 05:01 PM
Book Summary persiphone Calibre 5 03-05-2009 02:51 PM
Book summary macphersondh Sony Reader Dev Corner 13 12-21-2008 09:25 PM


All times are GMT -4. The time now is 09:31 PM.


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