 |
 |
|
 |
|
 |
|  |
|  |
|
 |
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)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
William F Pokorny <ano### [at] anonymous org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
William F Pokorny <ano### [at] anonymous org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
William F Pokorny <ano### [at] anonymous org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"jr" <cre### [at] gmail com> wrote:
> William F Pokorny <ano### [at] anonymous org> 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'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
William F Pokorny <ano### [at] anonymous org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |