Author Topic: Font frustration  (Read 7772 times)

w14

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • http://
Font frustration
« on: August 08, 2004, 06:23:24 pm »
Often when I am browsing with Opera, text does not render correctly. For example, a "-" will render as a square, I assume because the fonts included with the Z are reduced character sets.

I see the same results when I convert certain webpages to .pdb files for displaying on Opie Reader.

Does anyone have any recommendations for how best to encode html pages using JPluckX for use on the Z? TimW, are you there?

Thanks,

Mike.
sl-c3100
pdaxrom 1.1.0 beta1

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Font frustration
« Reply #1 on: August 08, 2004, 08:07:19 pm »
Under configuration check "remap" - this will turn long - into -- and funny " into real "

The other option is to change the codeset to windows 1252 or 1250 - this seems to work for most pages.

It's a font problem more than a opie-reader problem, I installed arial unicode and most of the problems went away, but the arial font is too big.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Font frustration
« Reply #2 on: August 09, 2004, 04:31:05 am »
Quote
windows 1252 or 1250

Actually, "Palm" encoding is slightly better 8^) (on opie-reader's Locale tab in the settings dialog). This is a minor modification of the windows encoding which is different in about 4-5 characters but it does match the original Palm font encoding exactly.

w14

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • http://
Font frustration
« Reply #3 on: August 09, 2004, 07:43:51 am »
Thanks!

I had remap checked and it didn't seem to change anything on its own. Changing the encoding as you both described did the trick. If only Opera was so easy ...

Cheers,

Mike.
« Last Edit: August 09, 2004, 07:44:21 am by w14 »
sl-c3100
pdaxrom 1.1.0 beta1

vinc17

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • https://www.vinc17.net/
Font frustration
« Reply #4 on: August 09, 2004, 08:26:24 am »
I have a similar problem on my SL-C860: the --- (mdash) is not shown. This is not an encoding problem (the HTML source code contains the corresponding numeric entity).

Where can I find "remap"?

w14

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • http://
Font frustration
« Reply #5 on: August 09, 2004, 09:06:04 am »
Quote
Where can I find "remap"?

file menu/settings/configuration/layout tab

Mike.
sl-c3100
pdaxrom 1.1.0 beta1

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Font frustration
« Reply #6 on: August 09, 2004, 09:20:33 am »
Almost forgot. If you are using Mobipocket files (eg the Baen free library .prc files) then you will probably also need to select Repalm on the Layout tab of the Settings/Configuration dialog. This is because Mobipocket format uses html style entities but uses them for palm encoding rather than unicode.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Font frustration
« Reply #7 on: August 09, 2004, 09:56:11 am »
Quote
It's a font problem more than a opie-reader problem, I installed arial unicode and most of the problems went away, but the arial font is too big.

Stubear, how did you install ArialUnicode on the Zaurus? It's a truetype font? How do you do this?

Later.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Font frustration
« Reply #8 on: August 09, 2004, 07:22:50 pm »
Downloaded makeqpf from  ftp://zaurus.ionkov.net/pub/makeqpf

and then did

Code: [Select]
makeqpf -display Transformed:Rot270 -A
More info here

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Font frustration
« Reply #9 on: August 10, 2004, 04:00:16 am »
Right, I've read the page. I'd like to ask: I don't have a linux desktop PC, so can I somehow run this command on the Zaurus? It's not a shell script as I see.

So can I do the conversion on the Zaurus?

Later.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Font frustration
« Reply #10 on: August 10, 2004, 04:24:34 am »
I think there is a Zaurus version at http://moria.ionkov.net/zaurus/makeqpf/

Get makeqpf-arm.zip  (I think)
« Last Edit: August 10, 2004, 04:26:04 am by TimW »

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Font frustration
« Reply #11 on: August 10, 2004, 05:30:06 am »
Thanks. I've downloaded the arm version, but would ask for a more explicit help also.

I've put the arialun.ttf and the makeqpf-arm in a temp directord on a cf card. Then tried running the makeqpf command as above, however I got a bunch of lines saying "Already a ROM font"...

I'm not sure whether I should edit the fontdir file as per the above page before the font conversion is done? Should I?

Should I explicitly put in all the lines for all the arialuni.ttf font sizes? If I want bold and italics, should I also put in lines for that? Does the font have to be copied to the fonts directory for this? Or should I edit the fontdir and put in the whole path to the CF location?

Thanks for help.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Font frustration
« Reply #12 on: August 10, 2004, 06:14:59 am »
I did this once a long time ago but IIRC you need to put the ttf files in /opt/Qtopia/lib/fonts (same directory as fontdir), edit fontdir as per the instructions on the referenced page and then run "makeqpf -A" (without the quotes).

The bunch of lines about Already a ROM font are a good sign. This just means that you already have some qpf files installed. But it won't convert the ttf unless the ttf is in the right place and the changes are made to fontdir.

The only other gotcha is that makeqpf tries to take over the frame buffer but a restart of qtopia is all that is needed. I have a SL5000 with less memory and I found it was better if I quit Qtopia altogether and then did a soft reset but you will probably have enough memory not to do that (providing you can find the restart qtopia button after makeqpf has run).

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Font frustration
« Reply #13 on: August 10, 2004, 08:19:09 am »
Hi:

I think I need some more help here.

I copied the arialuni.ttf to the /opt/Qtopia/lib/fonts directory.

edited fontdir, I added the following lines:

Code: [Select]
ArialUnicode arialuni.ttf TTF n 50 80 u
ArialUnicode arialuni.ttf TTF n 50 100 u
ArialUnicode arialuni.ttf TTF n 50 120 u
ArialUnicode arialuni.ttf TTF n 50 140 u
ArialUnicode arialuni.ttf TTF n 50 160 u
ArialUnicode arialuni.ttf TTF n 50 180 u
ArialUnicode arialuni.ttf TTF n 50 200 u
ArialUnicode arialuni.ttf TTF n 50 240 u
ArialUnicode arialuni.ttf TTF n 50 360 u
ArialUnicode arialuni.ttf TTF n 50 480 u
ArialUnicode arialuni.ttf TTF n 50 720 u
ArialUnicode arialuni.ttf TTF y 50 80 u
ArialUnicode arialuni.ttf TTF y 50 100 u
ArialUnicode arialuni.ttf TTF y 50 120 u
ArialUnicode arialuni.ttf TTF y 50 140 u
ArialUnicode arialuni.ttf TTF y 50 160 u
ArialUnicode arialuni.ttf TTF y 50 180 u
ArialUnicode arialuni.ttf TTF y 50 200 u
ArialUnicode arialuni.ttf TTF y 50 240 u
ArialUnicode arialuni.ttf TTF y 50 360 u
ArialUnicode arialuni.ttf TTF y 50 480 u
ArialUnicode arialuni.ttf TTF y 50 720 u
ArialUnicode arialuni.ttf TTF n 75 80 u
ArialUnicode arialuni.ttf TTF n 75 100 u
ArialUnicode arialuni.ttf TTF n 75 120 u
ArialUnicode arialuni.ttf TTF n 75 140 u
ArialUnicode arialuni.ttf TTF n 75 160 u
ArialUnicode arialuni.ttf TTF n 75 180 u
ArialUnicode arialuni.ttf TTF n 75 200 u
ArialUnicode arialuni.ttf TTF n 75 240 u
ArialUnicode arialuni.ttf TTF n 75 360 u
ArialUnicode arialuni.ttf TTF n 75 480 u
ArialUnicode arialuni.ttf TTF n 75 720 u
ArialUnicode arialuni.ttf TTF y 75 80 u
ArialUnicode arialuni.ttf TTF y 75 100 u
ArialUnicode arialuni.ttf TTF y 75 120 u
ArialUnicode arialuni.ttf TTF y 75 140 u
ArialUnicode arialuni.ttf TTF y 75 160 u
ArialUnicode arialuni.ttf TTF y 75 180 u
ArialUnicode arialuni.ttf TTF y 75 200 u
ArialUnicode arialuni.ttf TTF y 75 240 u
ArialUnicode arialuni.ttf TTF y 75 360 u
ArialUnicode arialuni.ttf TTF y 75 480 u
ArialUnicode arialuni.ttf TTF y 75 720 u

Then ran
Code: [Select]
makeqpf -display Transformed:Rot270 -A
But then I get the following output on the screen:
Code: [Select]
QServerSocket: failed to bind or listen to the socket
and a bunch of
Code: [Select]
Already a ROM fontlines.

However no qpf fonts are output as the result.

Where am I going wrong?

Later.
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Font frustration
« Reply #14 on: August 10, 2004, 09:27:47 am »
From the Trolltech pages referenced in the original how-to:

Quote
When Qt/Embedded applications run, they look for a file called $QTDIR/etc/fonts/fontdir or /usr/local/qt-embedded/etc/fonts/fontdir. This file defines the fonts available to the application. It has the following format:


name file renderer italic weight size flags
where:


name  Helvetica, Times, etc. 
file  helvR0810.bdf, verdana.ttf, etc. 
renderer  BDF or TTF 
italic  y or n 
weight  50 is Normal, 75 is Bold, etc. 
size  0 for scalable or 10 times pointsize (eg. 120 for 12pt) 
flags  Flag characters:
s = smooth (anti-aliased)
u = unicode range when saving (default is Latin 1)
a = ascii range when saving (default is Latin 1)

Not easy to understand - especially as there is no example.

What it means is you only need four entries for each font (one each for normal, italic, bold and bold-italic)

ArialUnicode arial.ttf TTF n 50 0 su 80,100,120,140,160,180,200,240,360,480,720
ArialUnicode ariali.ttf TTF y 50 0 su 80,100,120,140,160,180,200,240,360,480,720
ArialUnicode arialbd.ttf TTF n 75 0 su 80,100,120,140,160,180,200,240,360,480,720
ArialUnicode arialbi.ttf TTF y 75 0 su 80,100,120,140,160,180,200,240,360,480,720

respectively (use the actual names of the font files on your system - I've used the names as they are on my windows machine). The extra "s" just before the u generates anti-aliased fonts - like smoothtimes - just leave it off if you don't like anti-aliasing. Also, I don't think you really want all those sizes as they get quite big - especially the larger fonts. OTOH, you know better than I do how much space you have spare.

Also, I don't think you need the -display Transformed:Rot270 if you run it on the Zaurus as it can automatically tell that the display is rotated. But remember - this is all from memory of something I did a long while back.

I don't think either of the messages you got are a cause for concern - the Zaurus makeqpf is built with some compromises which means it doesn't play nice...but it does work.