kmonsoor / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Expectations about supported font formats #731

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Expectations about supported font formats

(comes from issue #702)

Some fonts have incorrect render in pyglet (bottom of character clipped out, 
wide characters as '@' or 'm' have spurious pixels at right side)

Somehow, the wording in examples/font_comparison.py suggest that the author 
expects "if a font is enumerated then it should render fine"  
This is an expectations vs current implementation issue, because not all font 
formats are supported.

Perhaps the text in 
http://pyglet-current.readthedocs.org/en/latest/programming_guide/text.html#id18
could be slightly enhanced, and same for the comments in font_comparison.py 

I will propose a patch about this.

Original issue reported on code.google.com by ccanepacc@gmail.com on 7 Apr 2014 at 2:12

GoogleCodeExporter commented 9 years ago
Proposed changes in doc/programming_guide/text.txt
My english is not too good, corrections are welcomed.

diff -r 9781eb46dca2 doc/programming_guide/text.txt
--- a/doc/programming_guide/text.txt    Thu Apr 03 19:13:36 2014 +0100
+++ b/doc/programming_guide/text.txt    Mon Apr 07 13:35:31 2014 -0300
@@ -2,8 +2,10 @@
 ===============

 pyglet provides the `font` module for rendering high-quality antialiased
-Unicode glyphs efficiently.  Any installed font on the operating system can be
-used, or you can supply your own font with your application.  
+Unicode glyphs efficiently.  Any installed font on the operating system is 
seen 
+by pyglet, or you can supply your own font with your application.  
+
+Notice that not all font formats are supported, see `Supported font formats`_

 Text rendering is performed with the `text` module, which can display
 word-wrapped formatted text.  There is also support for interactive editing of
@@ -622,7 +624,9 @@
 Supported font formats
 ^^^^^^^^^^^^^^^^^^^^^^

-pyglet can load any font file that the operating system natively supports.
+pyglet can load any font file that the operating system natively supports, 
+but not all formats all fully supported.
+
 The list of supported formats is shown in the table below.

     .. list-table::
@@ -648,7 +652,7 @@
           - 
           - X 
           - 
-        * - OpenType (.ttf) [#opentype]_
+        * - OpenType (.otf) [#opentype]_
           -
           - X
           -
@@ -666,7 +670,10 @@
                Mac OS X, the files can be used on any platform.  pyglet
                does not currently make use of the additional kerning and
                ligature information within OpenType fonts.
+               In Windows a few will use the variant DEVICE_FONTTYPE and may 
render bad, by example inconsolata.otf, from 
http://levien.com/type/myfonts/inconsolata.html

+Some of the fonts found in internet may miss information for some operating 
systems, others may have been written with work in progress tools not fully 
compliant with standards. Using the font with text editors or fonts viewers can 
help to determine if the font is broken.
+ 
 OpenGL font considerations
 --------------------------

Original comment by ccanepacc@gmail.com on 7 Apr 2014 at 4:44

Attachments:

GoogleCodeExporter commented 9 years ago
You're probably right.

Btw, current docs are generated in: http://pyglet.org/doc-current/index.html 
(the RDD version may be incomplete).

Original comment by useboxnet on 12 Apr 2014 at 1:27

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 190c95ab345e.

Original comment by useboxnet on 13 Apr 2014 at 6:54