Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#685 closed defect (worksforme)

[MapServer]Fonts in "fonts.txt" file not found on Linux

Reported by: nsavard@… Owned by: sgillies@…
Priority: high Milestone:
Component: MapScript-SWIG Version: 4.3
Severity: normal Keywords:
Cc:

Description

Fonts in "fonts.txt" file are Windows fonts.  Which font should I use in order
for your tests to go through?

Fedora Core 1

---------------------
Error:



[nsavard@localhost python]$ python tests/testMapScript.py
..............F........E......................E..EEE..EE......E..................EF......E............................
======================================================================
ERROR: testAddPointFeature (__main__.InlineFeatureTestCase)
----------------------------------------------------------------------


Traceback (most recent call last):
  File "tests/testMapScript.py", line 927, in testAddPointFeature
    msimg = self.mapobj1.draw()
  File "build/lib.linux-i686-2.2/mapscript.py", line 1147, in draw
    def draw(*args): return _mapscript.mapObj_draw(*args)
MapServerError: msGetLabelSize(): TrueType Font error. Could not find/open font
 
======================================================================
ERROR: testAppendNewOutputFormat (__main__.NewOutputFormatTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/testMapScript.py", line 966, in testAppendNewOutputFormat
    imgobj = self.mapobj1.draw()
  File "build/lib.linux-i686-2.2/mapscript.py", line 1147, in draw
    def draw(*args): return _mapscript.mapObj_draw(*args)
MapServerError: msGetLabelSize(): TrueType Font error. Could not find/open font
 
======================================================================
...

Change History (6)

comment:1 by sgillies@…, 20 years ago

Resolution: worksforme
Status: newclosed
Normand, this is not a bug.  Since fonts vary from system to system, it
is up to the user to make sure that the test.map file and fonts.txt are
valid.  Explained in mapscript/python/tests/TESTING.txt.

You can use whichever fonts you want.  I don't know FC 1 so I can't
make a specific recommendation.

comment:2 by nsavard@…, 20 years ago

Cc: morissette@… added
Just a question:  Why not use free fonts available on both Windows and Unix
platform?  There are some free fonts that could be used for testing at the
following address:  http://www.gnome.org/fonts/.  I CC Daniel as well on this
bug because he has some comments to do.

comment:3 by sgillies@…, 20 years ago

My goal was to keep the mapserver test data very lightweight.  I don't
want to add fonts.  Everyone has fonts on their system and can easily
tweak their fonts.txt file.  Maybe what I should do is move the fonts.txt
file to something like fonts.txt.template?  That way people can edit it
to make their own fonts.txt file that won't be clobbered when they do
a cvs update.

See http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=453 for test data
issues.

comment:4 by dmorissette, 20 years ago

I'm all with you for keeping the test data in CVS lightweight, but requiring
that people setup their own fonts.txt to run the test suite is the best way to
prevent its adoption.  One TTF font ain't that big IMHO, but if that's not an
option then how about making the preconfigured test data available as a
download? (and using the open source (free) font that Norm pointed to of course)

comment:5 by nsavard@…, 20 years ago

Just to clarify a point"  Paul Spencer with Fred Warnock's help found these free
fonts.

comment:6 by sgillies@…, 20 years ago

Superceded by bug 694.
Note: See TracTickets for help on using tickets.