View Full Version : PRS-500 Accented characters onto reader using Mac


squiggle8
11-19-2007, 01:55 PM
I am trying to get among others Hungarian texts onto my reader, somebody please help.
I am using Kovid's libprs500.
Some html files convert fine (or not far off) - that's usually the ones that have the accented characters in the main body instead of html encoded ones.
In the html->lrs files the bottleneck are the characters "?" and "?" <edit: wow, these are sooo special they don't show up here, either. Anyway, it's a u with double acute and an o with double acute. ű and ő - used unicode here). They are usually replaced by space, sometimes just omitted (did not manage to figure out which one happens when).
RTF, PDF so far never converted to anything enjoyable, it's usually the same two characters giving trouble, occasionally others, too.
I did try embedding fonts, according to Kovid my command was correct, however, the embedding did not happen. I must be missing something and I cannot figure out what. Kovid converted a font embedded file for me, it looks GREAT, however, it took the reader 8 minutes to read it in (initialize it?) - so this is not my preferred option so far (not that I can even do it).

Please, somebody help, I'm getting rather frustrated!

kovidgoyal
11-19-2007, 01:57 PM
The 8 minutes time is for initial pagination. Happens once per file so it shouldn't really bother you.

squiggle8
11-19-2007, 03:01 PM
Kovid, indeed, it was only several minutes for the first time. And your file with the embedded font is the prettiest doc I have on my reader for sure. :)
So I would love to master the art of doing this myself.

I did search my machine for the fonts to get to the command
any2lrf abelreng.rtf --serif-family "/Library/Fonts, Times New Roman"
- the font seems there, however, the outputfile is less than half in size of yours and clearly does not have the spec. chars.
I tried it on html and rtf - no difference.
Moni

kovidgoyal
11-19-2007, 03:26 PM
It needs to be present as a ttf file. Try searching for the microsoft corefonts online (which includes the ttf files and extract them into some directory on your system) then run any2lrf

squiggle8
11-19-2007, 05:37 PM
Ok, I might be getting here somewhere, I think you are onto something!

Finding the tff files was not trivial. I did download it from somewhere into a new folder. The file generated is a little bigger than the previous one by me but still half of yours. It did take ages to initialize it on the reader - which tells me that something is happening.
The outcome is not there yet, though.

kovidgoyal
11-19-2007, 05:40 PM
Well being an exceptionally generous soul, i've decided to add support for this to the GUI. So if it's too hard, you'll just have to wait till the next version. :-)

kovidgoyal
11-19-2007, 05:47 PM
You may also find the tool lrf2lrs useful. You can run it on the generated lrf file and see if the font is being included.

squiggle8
11-19-2007, 10:30 PM
Well being an exceptionally generous soul, i've decided to add support for this to the GUI. So if it's too hard, you'll just have to wait till the next version. :-)

Oh, ok, I'm waiting!

I'm waiting...

I'm waiting.

(are we there yet?)
:grin2:

Will the GUI have it's own font files or will rely on the files I don't seem to be able to provide? <looking concerned>

kovidgoyal
11-19-2007, 11:06 PM
It will use the fonts available to the OS.

squiggle8
12-06-2007, 04:01 PM
Kovid, thank you for the amazing speed of development - I could not believe you already put out a new release - n.b. with the font embedding...
I wish I could tell you that all is well - I still did not manage to make ONE of the sticky characters appear on my reader. I tried to convert the file you converted for me - no luck, the special characters are not even showing in the libprs500 viewer.
My workaround: I could put in many books by converting
ő to &otilde;
and ű to &ucirc; in html and then convert it to lrf. It's not pretty but the pages turn well and it's not too disturbing. It does not work on all my files but I have enought to read for the moment.
As for embedding - something must be different about my system from yours and I cannot figure it out...