including icons in the source

9 views
Skip to first unread message

David Farmer

unread,
Sep 30, 2026, 12:02:42 AM (10 days ago) Sep 30
to prete...@googlegroups.com
I am working on making the HTML version work better when offline.
(This is related to the recent problem where "chevron" appeared in the TOC
because of incorrect fetching that icon from Runestone).

Including the entire icons font with the source adds 388K.

Including only the icons currently used, adds 5.5K.

The Guide says that authors can use any icon by name. That may
no longer be true if we only ship the icons which are always needed.

How should I proceed?

Andrew Scholer

unread,
Sep 30, 2026, 11:57:23 AM (10 days ago) Sep 30
to prete...@googlegroups.com
Authors can't use the materials design icons by name (at least without shenanigans), but developers can. They may be referenced from XSL, JS, or even CSS. (Example of the later is that the "chevron" is not universal. Different themes use different symbols for expand/contract in the ToC).

For use by Runestone, Brad built a custom subset of the same material design font. PreTeXt could certainly do the same.

Perhaps via a utilities script that uses a list of icons to build a custom font. (As we learned with Runestone, it should be given a custom name so it doesn't collide with the real one.)

If a developer wants to use a new icon, they can add it to the list and rebuild the font. (Which leaves figuring out if the font is always rebuilt, cached by the CLI, baked into the PreTeXt source, who commits it if is part of the source, etc... )

Anyone who is rolling their own custom theme outside of the PreTeXt source would be on their own for providing any new icons. Which seems reasonable.

Andrew

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CAOHZuC08NR6VG-tQzdnOADNoyAGm2BnHtvwL7mB_B%3DhCCPVx6A%40mail.gmail.com.

David Farmer

unread,
Sep 30, 2026, 12:08:27 PM (10 days ago) Sep 30
to prete...@googlegroups.com
That makes sense.

I'll go with the limited selection, and in the documentation indicate that
if a developer needs a new icon, then that has to be added.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CACm44N9rF3WFbS5jfNfE3DLeinf7ZkMe5E%3D29%2B0Oe72fjurqPw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages