Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - photon font issues porting from QNX 4 to QNX 6: (11 Items)
   
photon font issues porting from QNX 4 to QNX 6  
Hello!

I have some issues porting from QNX4 to QNX6.5x

I use selfmade .phf - fonts from QNX4 containing own symbols in it for a 
small photon-application window running a terminal in it.

Changing the font using an escape sequence ( echo "\0033\"fphffontname\"" 
) causes the terminal to change the size of a terminal because of the 
character size, but the text is invisible. changing back , eg. to pcterm14 
works well (text is visible again).
The same happens to pterm windows.

I have done:
I put the *.phf in the /usr/photon/font_repository and using "mkfontdir -b 
-d /usr/photon/font_repository" for creating new entries in fontdir file. 
This works.

Watching all installed/registered fonts with a test program using 
PfQueryFontsCx(...) shows up my fonts. But, looking to the properties of a 
pterm window doesn't show the own fonts in the custom list.

One Difference, I figured out is that the preinstalled fonts 
FontDetails.flags uses one more bitstring
our fonts flag is 0x11 (PHFONT_INFO_FIXED|PHFONT_INFO_PLAIN) ; 
instead eg. pcterm14 is 0x111 
(PHFONT_INFO_SANSERIF|PHFONT_INFO_FIXED|PHFONT_INFO_PLAIN)

Using "fontinfo -f fontfile.phf" also shows up one more attribute for the 
preinstalled fonts: ( "[__PHF_P2_ATTR_][__PF_FIX_]" contrary to our fonts 
: "[__PF_FIX_]" )

Rendering the fonts using "fontinfo -r ..." shows up all characters.

I guess there are some information missing in the header of the font 
files.

Is there any documentation about the header or structure of phf - font 
files ? I didn't found any in the forum or www .

Or is there a font editor ?

btw: the font from Mike Gorchak (
http://community.qnx.com/sf/discussion/do/listPosts/projects.graphics/discussion.photon_microgui.topc23114
) works well too.

Thanks in advance
Mike Lorenz

Re: photon font issues porting from QNX 4 to QNX 6  
I did some reverse engineering.

Theres are differences between old photon fonts and new photon fonts in the header.
The data the bitmaped fonts seems to stay the same.
Exchanging the pure data of e.g. a 8x16 point sized font (pcs16.phf) doesn't work while preserving the offset to the 
data (0x3f) and the file size. "mkfontdir" doesn't accept it. I guess, there's some checksum or CRC in the header.

The header of the old font is fixed sized.
The header of the new fonts is dynamical sized because of the font name. So there are small different sizes between 
similar font files e.g. between pcs16.phf and pcss16.phf .
RE: photon font issues porting from QNX 4 to QNX 6  
Yes, there are two types of phf fonts, PHF and PHFv2.  There are both supported by the font server.
Is there a problem, or do you want the header definitions for PHFv2?

-----Original Message-----
From: Mike Lorenz [mailto:community-noreply@qnx.com] 
Sent: February-22-13 4:29 AM
To: photon-graphics
Subject: Re: photon font issues porting from QNX 4 to QNX 6

I did some reverse engineering.

Theres are differences between old photon fonts and new photon fonts in the header.
The data the bitmaped fonts seems to stay the same.
Exchanging the pure data of e.g. a 8x16 point sized font (pcs16.phf) doesn't work while preserving the offset to the 
data (0x3f) and the file size. "mkfontdir" doesn't accept it. I guess, there's some checksum or CRC in the header.

The header of the old font is fixed sized.
The header of the new fonts is dynamical sized because of the font name. So there are small different sizes between 
similar font files e.g. between pcs16.phf and pcss16.phf .



_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post99450
To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
Re: RE: photon font issues porting from QNX 4 to QNX 6  
The font server loads the old fashioned fonts but doesn't let display the characters in pterm.
And, I'm only able to choose the old font in pterm properties  if the flag "f" is changed to "Nf" in the "fontdir" file.

That's why I wanted to convert the old files using the new header data.

Maybe there's another way: creating a bdf file from the raw character data and converting this bdf using "bdftophf2" . 
The specs are available at Adobe and x.org ...
RE: RE: photon font issues porting from QNX 4 to QNX 6  
650 target?

-----Original Message-----
From: Mike Lorenz [mailto:community-noreply@qnx.com] 
Sent: February-22-13 10:36 AM
To: photon-graphics
Subject: Re: RE: photon font issues porting from QNX 4 to QNX 6

The font server loads the old fashioned fonts but doesn't let display the characters in pterm.
And, I'm only able to choose the old font in pterm properties  if the flag "f" is changed to "Nf" in the "fontdir" file.

That's why I wanted to convert the old files using the new header data.

Maybe there's another way: creating a bdf file from the raw character data and converting this bdf using "bdftophf2" . 
The specs are available at Adobe and x.org ...



_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post99464
To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
Re: RE: RE: photon font issues porting from QNX 4 to QNX 6  
I'm using 650 SP1
RE: RE: RE: photon font issues porting from QNX 4 to QNX 6  
I will send you experimental binaries, to see if the problem is fixed.

-----Original Message-----
From: Mike Lorenz [mailto:community-noreply@qnx.com] 
Sent: February-22-13 10:53 AM
To: photon-graphics
Subject: Re: RE: RE: photon font issues porting from QNX 4 to QNX 6

I'm using 650 SP1



_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post99466
To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
RE: RE: RE: photon font issues porting from QNX 4 to QNX 6  
What cpu architecture, x86?

-----Original Message-----
From: Mike Lorenz [mailto:community-noreply@qnx.com] 
Sent: February-22-13 10:53 AM
To: photon-graphics
Subject: Re: RE: RE: photon font issues porting from QNX 4 to QNX 6

I'm using 650 SP1



_______________________________________________

Photon microGUI
http://community.qnx.com/sf/go/post99466
To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6  
yes, x86
Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6  
I have not forgotten, if they are not posted by Friday, please ping this thread.
Re: RE: RE: RE: photon font issues porting from QNX 4 to QNX 6  
Here are the experimental binaries, hopefully they fix your PHF issues.
If you require official builds of these binaries, you will need to go through your tech support representative to 
arrange a PSP build if your plan permits.
For cross reference, these changes are related to PR170061.
Attachment: Text phfont_phf_patch.tar.gz 456.65 KB