G'day hippo,

As you can see, I made some serious attempts to choose the best Perl version. There are, of course, other considerations such as platforms and available fonts; for instance, check parv's shell problems.

"There is probably no way to be able to tell reliably from within the script whether these codepoints will be rendered correctly by the terminal ..."

As an absolute statement, I would have to agree; however, there are ways to mitigate this. In a recent module (Tk::Aux::Font) that I wrote — purely for my own use — I had this subroutine:

sub _best_family { my ($mw, $type) = @_; state $families = { sans => ['Verdana', 'DejaVu Sans', 'Helvetica'], serif => ['Times New Roman', 'DejaVu Serif', 'Times'], mono => [ 'Menlo', 'Andale Mono', 'Lucida Console', 'Consolas', 'Courier New', 'Courier' ], emoji => ['Times New Roman', 'DejaVu Serif', 'Times'], }; my $actual_family; for my $family ($families->{$type}->@*) { my $test_font = $mw->fontCreate(-family => $family); $actual_family = $mw->fontActual($test_font, '-family'); last if $actual_family eq $family; } return $actual_family; }

Whilst developing, I tweaked this multiple times, especially with respect to the actual font order for various families. My overall findings were that "sans" and "mono" failed to produce many glyphs; "serif" and "emoji" (in this instance, the same lists) rendered many more. On my Win10/Cygwin, "Times New Roman" was the best; "DejaVu Serif" came a very close second (it seemed to render glyphs a pixel or two below the optimal position); "Times" was OK but resolution was poor and I'd rank it as a poor third cousin.

Based on all of this, I'd recommend that you render with "DejaVu Serif", instead of "DejaVu Sans".

Please bear in mind that was, as stated, intended to be "a little more visually appealing"; it solves no bugs nor improves any optimisations. It's possibly a nice-to-have but never essential.

If it's of any use, here's a relevant extract from my local CSS:

:root { --font-pref-sans-serif: "Verdana"; --font-pref-serif: "Times New Roman"; --font-pref-monospace: "Menlo", "Andale Mono", "Lucida Console", +"Courier New"; --font-manuscript-base: "Junicode"; --font-alchemy-base: "Newton Sans Regular"; --font-emoji-base: "Apple Color Emoji", "Segoe UI Emoji", "EmojiOne", "AndroidEmoji", "emojidex", "fxemoji", "NotoColorEmoji", "Twemoji"; --font-symbol-base: "Symbola"; } :root { --font-std-sans-serif: var(--font-pref-sans-serif), sans-serif; --font-std-serif: var(--font-pref-serif), serif; --font-std-monospace: var(--font-pref-monospace), monospace; --font-std-cursive: cursive; --font-std-fantasy: fantasy; } :root { --font-manuscript: var(--font-manuscript-base), var(--font-std-serif); --font-alchemy: var(--font-alchemy-base), var(--font-std-sans-serif); --font-emoji: var(--font-emoji-base), var(--font-std-monospace), var(--font-std-sans-serif); --font-symbol: var(--font-symbol-base), var(--font-std-monospace), var(--font-std-sans-serif); --font-emoji-or-symbol: var(--font-emoji-base), var(--font-std-monospace), var(--font-std-sans-serif); /* var(--font-symbol-base); */ --font-unicode-raw: var(--font-pref-serif), var(--font-symbol-base), serif, var(--font-std-sans-serif), var(--font-std-monospace), var(--font-std-cursive), var(--font-std-fantasy); }

— Ken


In reply to Re^2: Emoji Progress Spinners by kcott
in thread Emoji Progress Spinners by kcott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.