POV-Ray : Newsgroups : povray.beta-test : POV-Ray v3.8.0-x.freetype.1 : POV-Ray v3.8.0-x.freetype.1 Server Time
20 Apr 2024 00:13:41 EDT (-0400)
  POV-Ray v3.8.0-x.freetype.1  
From: clipka
Date: 16 Jan 2019 21:22:52
Message: <5c3fe6fc$1@news.povray.org>
Now implementing `text` objects via FreeType and prism primitives:

https://github.com/POV-Ray/povray/releases/tag/v3.8.0-x.freetype.1

Some notes:

- The `cmap` syntax is currently doing nothing.

- Support for various non-TrueType fonts should be included for free, 
provided the font is any outline font (e.g. CFF-flavour OpenType fonts). 
Bitmap fonts will of course not work, nor will colour SVG fonts.

- Performance has degraded a bit, but I'm willing to accept this for the 
sake of extended functionality and easier maintenance.

Also, render results differ in several ways:

- Previously, the text was aligned so that x=0 coincided with the 
/actual/ left side of the first character (i.e. its outline). The new 
implementation instead has x=0 coincide with the first character's 
/nominal/ left side (i.e. its "character box"), leaving a small gap 
typically matching half the distance between characters. Since I expect 
this to give aesthetically more pleasing results with multiple lines, I 
hesitate to invest time and effort to reproduce the old behaviour.

- In some cases (e.g. the German umlaut sequence `äöüß` with the 
`arial.ttf` font) horizontal placement of individual characters has 
changed. Since the new behaviour looks cleaner, I have no intention 
whatsoever to reproduce the old behaviour.

- POV-Ray v3.7 (haven't checked whether this has been fixed already) had 
the inside/outside orientation of the character "sides" the wrong way 
round, giving unexpected results when `interior_texture` is used. This 
has also been changed to be consistent with the character "faces" (*).

- (*) For normal TrueType fonts, that is. Based on the FreeType 
documentation, I totally expect the new implementation to get this 
wrong, and/or to mess up the "holes" (e.g. in characters like `o`), with 
/some/ font file formats or even individual fonts. Please keep your eyes 
peeled, I'm keen to get my hands on any such font specimens.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.