Sunday 4 August 2013

SQR error - (SQR 9004) TrueType font file albw.ttf cannot be opened.

Issue: SQR fails with the following error.

(SQR 9004) TrueType font file albw.ttf cannot be opened.

Solution: Implemented the following steps for rectifying the issue.

There are 2 things to check; either the font file does not exist in the location specified in sqr.ini file, or the path specified in sqr.ini file is not correct. Correct the error and try again.

01 = Font type.
Verify if the setup is correctly into the pssqr.ini to the  [TrueType Fonts] section
The Font Path=directory where fonts resides and the TrueType collection file (.ttf).

For example:
 [TrueType Fonts]

; This section specifies the mapping from TrueType font names used in
; above configuration section and physical file path of the font on
; operating system. For TrueType collection file (.ttc), font directory
; number should also be specified.
; (ex. font name=file path, directory number)

; Font Path=directory where fonts resides.  Default is SQRDIR.  On
; Windows, Windows font directory will be looked up too.  Fonts not
; residing on other directories must be specified full physical path.

Font Path= <PSHOME>\fonts\truetype\
Albany=albw.ttf
Albany-Bold=albwb.ttf
Cumberland=cumbwr__.ttf
Cumberland-Bold=cumbwb__.ttf
Thorndale=thowr___.ttf
Thorndale-Bold=thowb___.ttf
Angsana=angsa.ttf

02 = Font file path.
Verify if the thowr___.ttf collection is located to the correct destination  <PSHOME>\fonts\truetype.

1). Case example:
In one case the following entry in the PSSQR.UNX file caused this error...

(Entry in PSSQR.UNX)
; Font Path=directory where fonts resides. Default is SQRDIR.
Font Path=%PS_HOME%/fonts/truetype/

Note the "%PS_HOME%" included in the path. The PS_HOME value is supposed to be replaced during the installation using the installer. However, in this case, since the installer was not used the appropriate PS_HOME value was not substituted therefore causing the issue. Manually filling in the value of PS_HOME correctly for the problem environment resolved the issue.
(end Case example)


2). Case example:
Another solution scenario that works for this error is to fully qualify the path to the font itself, for example

Replace this line:
Cumberland=cumbwr__.ttf

with:
Cumberland=/directory/cumbwr__.ttf
(end Case example)

No comments:

Post a Comment