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 10-12-2015, 03:50 AM   #31
ICDeadPpl
Enthusiast
ICDeadPpl began at the beginning.
 
ICDeadPpl's Avatar
 
Posts: 35
Karma: 10
Join Date: Mar 2010
Location: Sweden
Device: Kobo Libra 2
Question

I get this error when trying to drag a Literata font on the .bat file:

Quote:
ECHO is off.
-r "literata-regular.otf"
ECHO is off.
ECHO is off.
X:\Downloads\Literata\
Enter font name: Liitterata
Do you wish to strip hints? [Y,N]?Y
Do you wish to enable legacy kerning? [Y,N]?Y
Do you wish to remove PANOSE information? [Y,N]?Y
Do you wish to darken the font? [Y,N]?N
Do you need enable the name hack? (Only choose if absulutely required) [Y,N]?N
ImportError: No module named site
Press any key to continue . . .
On Windows 10 64-bit. FontForge installed in "c:\Program Files (x86)\FontForgeBuilds".
ICDeadPpl is offline   Reply With Quote
Old 10-12-2015, 04:01 AM   #32
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
New Batch file

[s]If anyone is having trouble with the batch file, can you give this version a go to see if it makes any difference?

I have changed from calling ffpython.exe, to calling fontforge.exe -script

I don't know if it will help anyone, but that seems to be the preferred method of running scripts, which I didn't know about until after my last upload.
[/s]

NOTE: Please ensure you are running a recent build of fontforge (mid 2015 or later).

EDIT: batch file removed due to issue, see later posts

Last edited by sherman; 10-12-2015 at 04:36 AM. Reason: Removed obsolete batch file
sherman is offline   Reply With Quote
Advert
Old 10-12-2015, 04:03 AM   #33
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by ICDeadPpl View Post
I get this error when trying to drag a Literata font on the .bat file:



On Windows 10 64-bit. FontForge installed in "c:\Program Files (x86)\FontForgeBuilds".
Can you try the new batch file I uploaded in the previous post? Did you install the latest version of fontforge?
sherman is offline   Reply With Quote
Old 10-12-2015, 04:08 AM   #34
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,839
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Quote:
Originally Posted by sherman View Post
is that the entire output of the script? If not can you output the complete contents of the command window?

At what stage does it fail?

I want to try and figure out where things went wrong, to see if I can improve the script and/or batch file.
It prompts me for which bits I want, the last being the name hack. No matter what I seem to enter that's the result, and the whole result. I wouldn't expect it to matter but there is a space in my user folder name, I mention this since it's only outputting the first word and not the second.

eta- this is the result when I use the bat file you just uploaded. Result is the same no matter what I enter as the font name, was trying Playbook on a lark here because that's how fontforge wanted to generate it when doing this manually.

Code:
ECHO is off.
-r "literata-regular.ttf"
ECHO is off.
ECHO is off.
C:\Users\Mercury Glitch\Desktop\KoboifyFonts-0.3\
Enter font name: PlayBook
Do you wish to strip hints? [Y,N]?Y
Do you wish to enable legacy kerning? [Y,N]?Y
Do you wish to remove PANOSE information? [Y,N]?Y
Do you wish to darken the font? [Y,N]?N
Do you need enable the name hack? (Only choose if absulutely required) [Y,N]?Y
Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Based on sources from 09:10 AWST 27-Aug-2015-ML-TtfDb-D.
 Based on source from git with hash: 3d950d3cde977900e5138019a918ed671efb4449
C:\Program Files (x86)\FontForgeBuilds\bin\fontforge.exe: can't open file 'C:\Users\Mercury': [Errno 2] No such file or directory
Press any key to continue . . .

Last edited by MGlitch; 10-12-2015 at 04:23 AM.
MGlitch is offline   Reply With Quote
Old 10-12-2015, 04:26 AM   #35
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by MGlitch View Post
It prompts me for which bits I want, the last being the name hack. No matter what I seem to enter that's the result, and the whole result. I wouldn't expect it to matter but there is a space in my user folder name, I mention this since it's only outputting the first word and not the second.

eta- this is the result when I use the bat file you just uploaded. Result is the same no matter what I enter as the font name, was trying Playbook on a lark here because that's how fontforge wanted to generate it when doing this manually.

Code:
ECHO is off.
-r "literata-regular.ttf"
ECHO is off.
ECHO is off.
C:\Users\Mercury Glitch\Desktop\KoboifyFonts-0.3\
Enter font name: PlayBook
Do you wish to strip hints? [Y,N]?Y
Do you wish to enable legacy kerning? [Y,N]?Y
Do you wish to remove PANOSE information? [Y,N]?Y
Do you wish to darken the font? [Y,N]?N
Do you need enable the name hack? (Only choose if absulutely required) [Y,N]?Y
Copyright (c) 2000-2014 by George Williams. See AUTHORS for Contributors.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 with many parts BSD <http://fontforge.org/license.html>. Please read LICENSE.
 Based on sources from 09:10 AWST 27-Aug-2015-ML-TtfDb-D.
 Based on source from git with hash: 3d950d3cde977900e5138019a918ed671efb4449
C:\Program Files (x86)\FontForgeBuilds\bin\fontforge.exe: can't open file 'C:\Users\Mercury': [Errno 2] No such file or directory
Press any key to continue . . .
Thanks for that. I can reproduce the error here. It happens when the script is run from a location with a space in it

Font file paths can have spaces no trouble, but I seem to have missed a case.

It shouldn't take long to find and fix the cause.
sherman is offline   Reply With Quote
Advert
Old 10-12-2015, 04:31 AM   #36
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by sherman View Post
Thanks for that. I can reproduce the error here. It happens when the script is run from a location with a space in it

Font file paths can have spaces no trouble, but I seem to have missed a case.

It shouldn't take long to find and fix the cause.
Sigh. One set of quotation marks later...

Please try this batch file. It should solve your issue. If it does, I'll make a minor update to the first post.

EDIT: In case you were wondering, I forgot to enclose the script path in quotation marks in the batch file.

EDIT 2: Updated batch file now included in v0.3.1

Last edited by sherman; 10-17-2015 at 06:31 PM. Reason: Note about batch file
sherman is offline   Reply With Quote
Old 10-12-2015, 08:46 AM   #37
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by sherman View Post
Open it with the windows font viewer (if on windows), the internal font name should match the font name you entered in the script.

Also, make sure you strip the PANOSE information (option '-p'). This is very important for fonts to work properly on Kobo devices.
The Windows viewer shows the font name as Literata. Re-ran everything using the newest batch file, picked all the options except adding weight. Same result, Bold is not working
dmapr is offline   Reply With Quote
Old 10-12-2015, 12:09 PM   #38
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,839
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Quote:
Originally Posted by sherman View Post
Sigh. One set of quotation marks later...

Please try this batch file. It should solve your issue. If it does, I'll make a minor update to the first post.

EDIT: In case you were wondering, I forgot to enclose the script path in quotation marks in the batch file.
For the want of a nail, the kingdom was lost. Thankfully with the addition of those quotation marks all is well with the script and it now goes through without a hitch.
MGlitch is offline   Reply With Quote
Old 10-12-2015, 04:11 PM   #39
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by dmapr View Post
The Windows viewer shows the font name as Literata. Re-ran everything using the newest batch file, picked all the options except adding weight. Same result, Bold is not working
Is Literata the name you entered yourself?
sherman is offline   Reply With Quote
Old 10-12-2015, 07:44 PM   #40
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by sherman View Post
Is Literata the name you entered yourself?
Originally yes. When I ran your latest batch file I only had to answer yes/no prompts.
My font files are named Literata-Regular, Literata-Bold, Literata-BoldItalic, Literata-Italic. The batch file had recognized everything and used the appropriate switches.

Last edited by dmapr; 10-12-2015 at 07:47 PM.
dmapr is offline   Reply With Quote
Old 10-12-2015, 11:49 PM   #41
sherman
Guru
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: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by dmapr View Post
Originally yes. When I ran your latest batch file I only had to answer yes/no prompts.
My font files are named Literata-Regular, Literata-Bold, Literata-BoldItalic, Literata-Italic. The batch file had recognized everything and used the appropriate switches.
Not sure what's going on I'm afraid.

Literata appears to be a font that provides... difficulties.
sherman is offline   Reply With Quote
Old 10-13-2015, 12:25 AM   #42
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,839
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
I suspect it may be your source files for Literata. It's the same one I used the batch file on and aside from the initial error I've had no issues.

I just made a test ebook which has four lines of 'this should be 'x'' where 'x' is regular, bold, italic, and bold italic. Works fine as an epub on my H2O running 3.18.

Each line is what it should be.

Did you make sure to reboot your Kobo after loading the font files on, even if you'd previously had a version of Literata on, possibly especially if you did, you should reboot so it properly loads the fonts.

eta - not sure if it's kosher, but I got my Literata files from the Playbook apk which is available if you google for it. I'd shy away from any direct download of Literata since getting it from the Playstore app is easy.

Mods if the above isn't kosher please delete, I'm not linking to any source for the font as it is not open for free distribution.

Last edited by MGlitch; 10-13-2015 at 12:30 AM.
MGlitch is offline   Reply With Quote
Old 10-13-2015, 11:09 PM   #43
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by MGlitch View Post
I suspect it may be your source files for Literata. It's the same one I used the batch file on and aside from the initial error I've had no issues.

I just made a test ebook which has four lines of 'this should be 'x'' where 'x' is regular, bold, italic, and bold italic. Works fine as an epub on my H2O running 3.18.

Each line is what it should be.

Did you make sure to reboot your Kobo after loading the font files on, even if you'd previously had a version of Literata on, possibly especially if you did, you should reboot so it properly loads the fonts.

eta - not sure if it's kosher, but I got my Literata files from the Playbook apk which is available if you google for it. I'd shy away from any direct download of Literata since getting it from the Playstore app is easy.

Mods if the above isn't kosher please delete, I'm not linking to any source for the font as it is not open for free distribution.
Yep, got mine from the Play Books APK as well, which came straight out of the Play Store, no monkeying around there. I also did a double reboot (remove old fonts from the device, reboot, place new fonts on the device, reboot).

The only other thing that I can suspect is that I'm running 3.1.1, although it didn't have any issues with any other font.

Oh well, maybe there's a reason it wasn't meant for an e-ink screen
dmapr is offline   Reply With Quote
Old 10-14-2015, 12:11 AM   #44
MGlitch
Wizard
MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.MGlitch ought to be getting tired of karma fortunes by now.
 
Posts: 2,839
Karma: 22003124
Join Date: Aug 2014
Device: Kobo Forma, Kobo Sage, Kobo Libra 2
Maybe try manually renaming them? Like name them all something else, and then rename them to what they should be just to make sure there isn't some weirdness going on.
MGlitch is offline   Reply With Quote
Old 10-14-2015, 01:00 PM   #45
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by MGlitch View Post
Maybe try manually renaming them? Like name them all something else, and then rename them to what they should be just to make sure there isn't some weirdness going on.
Good idea, but no dice. Renamed to Delima, which has worked for me before with a different font, same lack of bold.

Also I think I may have lied about not entering the name before, the batch file did prompt me. I must've forgotten last time.
dmapr is offline   Reply With Quote
Reply

Tags
font

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
An Observation on Fonts - Improving readability by using *bold* versions of fonts nesler General Discussions 12 06-24-2012 12:33 PM
need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 hanpal Kindle Developer's Corner 1 02-20-2012 10:40 AM
Troubleshooting need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 hanpal Amazon Kindle 0 02-20-2012 08:51 AM
Touch Fonts question (special characters in stock and custom fonts) levil Kobo Reader 20 09-23-2011 01:51 PM


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


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