POV-Ray : Newsgroups : povray.binaries.animations : Looking at font file content as mp4 Server Time
14 Mar 2025 04:38:29 EDT (-0400)
  Looking at font file content as mp4 (Message 1 to 10 of 10)  
From: William F Pokorny
Subject: Looking at font file content as mp4
Date: 8 Mar 2025 21:26:42
Message: <67ccfc62@news.povray.org>
Partly due running down a bug in the text{} object; partly to test 
yuqk's bool_object{} pattern with multiple objects (10 text{} objects 
here); I've created animations of some mono font files.

With each font I rendered an animation at 50 characters per frame for 
the entire Basic Multilingual Plane (BMP) of 2^16 possible characters. I 
kept only those frames showing at least one supported character glyph 
and I created an mp4 with those frame images at 1 per second.

The thought is maybe this is a good way to review what characters are 
supported in a particular font alongside how POV-Ray is handling those 
characters.

Attached is an animation of the hack-r font. It's a popular linux / unix 
programmer's mono font.

Bill P.


Post a reply to this message


Attachments:
Download 'hackrfont.mp4.dat' (1668 KB)

From: jr
Subject: Re: Looking at font file content as mp4
Date: 9 Mar 2025 05:30:00
Message: <web.67cd5e736c6ae2bec342f2ec6cde94f1@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> Partly due running down a bug in the text{} object; partly to test
> yuqk's bool_object{} pattern with multiple objects (10 text{} objects
> here); I've created animations of some mono font files.
> ...
> The thought is maybe this is a good way to review what characters are
> supported in a particular font alongside how POV-Ray is handling those
> characters.

fwiw, agree.  I do like the "presentation".


> Attached is an animation of the hack-r font. It's a popular linux / unix
> programmer's mono font.

ideally you'd post a scene file / ini combo too, where one only needs to change
the name of the font.  (tia :-))


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Looking at font file content as mp4
Date: 9 Mar 2025 09:45:00
Message: <web.67cd9b576c6ae2be1f9dae3025979125@news.povray.org>
William F Pokorny <ano### [at] anonymousorg> wrote:

> With each font I rendered an animation at 50 characters per frame for
> the entire Basic Multilingual Plane (BMP) of 2^16 possible characters.

Is there a significance to various parts of that plane?
Can you represent it like an RGB space so you can see the (valid) character
density?  Maybe a pie chart?  Histogram?

Esp if you wanted to compare several font charts in the same render.

- BW


Post a reply to this message

From: William F Pokorny
Subject: Re: Looking at font file content as mp4
Date: 9 Mar 2025 14:25:35
Message: <67cddd1f$1@news.povray.org>
On 3/9/25 05:25, jr wrote:
> ideally you'd post a scene file / ini combo too, where one only needs to change
> the name of the font.  (tia :-))

My slightly cleaned up 'working files / code' attached. Unsure yet how 
I'll include this code in the yuqk distribution.

Thinking aloud. There is in the posted 'Hack-Regular' and the 
'LiberationMono-Regular' a few character collapses of width not seen 
with 'UbuntuMono-R'. Also some character stand ins which differ between 
fonts - and it isn't clear to me why of these get used as they do.

The Ubuntu font is the only one which includes the 65533 character for 
code points beyond the BMP. It's interesting to me too how the fonts 
differ in the one-off characters they support.

Anyhow...

Bill P.


Post a reply to this message


Attachments:
Download 'boolobjplay.pov.txt' (7 KB) Download 'determinecharacterwandh.inc.txt' (2 KB) Download 'reducefontframes.txt' (3 KB)

From: William F Pokorny
Subject: Re: Looking at font file content as mp4
Date: 9 Mar 2025 14:41:46
Message: <67cde0ea$1@news.povray.org>
On 3/9/25 09:44, Bald Eagle wrote:
> Is there a significance to various parts of that plane?

https://en.wikipedia.org/wiki/Plane_(Unicode)

> Can you represent it like an RGB space so you can see the (valid) character
> density?  Maybe a pie chart?  Histogram?
> 
> Esp if you wanted to compare several font charts in the same render.

Yes, I expect other representations are possible. Ive not given it any 
detailed thought.

Many work and play with fonts. There are tools available which offer 
other ways to query and present information about a font files. In years 
past I've used a few of them - but other than ttfdump, my memory is 
failing me at the moment. :-)

Aside: I have on my list to make a go at creating polygon{} font-derived 
character objects somewhat automatically using the ttfdump output given 
yuqk's new potential pattern support for the polygon{} object, but we'll 
see.

Bill P.


Post a reply to this message

From: Alain Martel
Subject: Re: Looking at font file content as mp4
Date: 9 Mar 2025 23:40:23
Message: <67ce5f27$1@news.povray.org>
Le 2025-03-08 à 21:26, William F Pokorny a écrit :
> Partly due running down a bug in the text{} object; partly to test 
> yuqk's bool_object{} pattern with multiple objects (10 text{} objects 
> here); I've created animations of some mono font files.
> 
> With each font I rendered an animation at 50 characters per frame for 
> the entire Basic Multilingual Plane (BMP) of 2^16 possible characters. I 
> kept only those frames showing at least one supported character glyph 
> and I created an mp4 with those frame images at 1 per second.
> 
> The thought is maybe this is a good way to review what characters are 
> supported in a particular font alongside how POV-Ray is handling those 
> characters.
> 
> Attached is an animation of the hack-r font. It's a popular linux / unix 
> programmer's mono font.
> 
> Bill P.
> 
I once did something similar. The difference was that I had 256 
characters per frame and the character number was not clearly displayed. 
The columns where the hexadecimal unit, the line was the second digit, 
and the frame number for the third+ digit.


Post a reply to this message

From: jr
Subject: Re: Looking at font file content as mp4
Date: 10 Mar 2025 02:55:00
Message: <web.67ce8ba56c6ae2bec342f2ec6cde94f1@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> ...
> My slightly cleaned up 'working files / code' attached. Unsure yet how
> I'll include this code in the yuqk distribution.
> ...
> Anyhow...

_thank_you_.  (tonight, I guess :-))


> ...other ways to query and present information about a font files.

in SDL.  the 'tabulated' macro comes with a shell script to view the first four
"pages" of glyphs, but would be easy "to monkey" to output an arbitrary set.
(fwiw)


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Looking at font file content as mp4
Date: 10 Mar 2025 10:05:00
Message: <web.67cef0e46c6ae2bec342f2ec6cde94f1@news.povray.org>
hi,

"jr" <cre### [at] gmailcom> wrote:
> William F Pokorny <ano### [at] anonymousorg> wrote:
> > My slightly cleaned up 'working files / code' attached. Unsure yet how
> > I'll include this code in the yuqk distribution.
> _thank_you_.  (tonight, I guess :-))

ran into trouble straightaway (sorry).  tried with a couple of different fonts
and keep getting a (the same) negative character width ?  (see attached)  I can
access the first 4 pages/1024 glyphs in the font ('streetsign.ttf') ok using a
different scene.  using yuqk a5c25dda.


regards, jr.


Post a reply to this message


Attachments:
Download 'strlen_problem.png' (9 KB)

Preview of image 'strlen_problem.png'
strlen_problem.png


 

From: William F Pokorny
Subject: Re: Looking at font file content as mp4
Date: 11 Mar 2025 06:16:07
Message: <67d00d67$1@news.povray.org>
On 3/10/25 10:02, jr wrote:
> ran into trouble straightaway (sorry).  tried with a couple of different fonts
> and keep getting a (the same) negative character width ?  (see attached)  I can
> access the first 4 pages/1024 glyphs in the font ('streetsign.ttf') ok using a
> different scene.  using yuqk a5c25dda.

Ah, guessing you didn't run as an animation? (The +kff1311 at the top of 
the boolObjPlay.pov file)

Me offering an excuse. :-) The scene should run frame 1 without using an 
animation setting. Change the line:

#local I = (frame_number-1)*CharsPerPage;

to

#local I = max(0,frame_number-1)*CharsPerPage;

Bill P.


Aside: The 'frame_number' is set to zero, if not running an animation - 
or if you try to render only the first frame with '+kfi1 +kff1' (+kfi2 
+kff2 works as does rendering any single frame >2)(*).

(*) Yep. The '+kfi1 +kff1' flags not working for frame 1 is quirky. On 
my list to look at it some day. I'm afraid to just change behavior 
without thinking more about why things might be set up as they are...

Aside 2: Be forewarned. I did the character image comparisons with SDL 
so the entire animation takes many hours for typically sparse BMP font 
implementations.


Post a reply to this message

From: jr
Subject: Re: Looking at font file content as mp4
Date: 11 Mar 2025 14:40:00
Message: <web.67d083166c6ae2bec342f2ec6cde94f1@news.povray.org>
hi,

William F Pokorny <ano### [at] anonymousorg> wrote:
> On 3/10/25 10:02, jr wrote:
> > ran into trouble straightaway (sorry).  ...
> Ah, guessing you didn't run as an animation? (The +kff1311 at the top of
> the boolObjPlay.pov file)
>
> Me offering an excuse. :-) The scene should run frame 1 without using an
> animation setting. Change the line:
> ...

ok, got it, thanks.


regards, jr.


Post a reply to this message

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