html.gadget and htmlttf.gadget are public ReAction (BOOPSI) gadget classes
for AmigaOS 3.2 that display simple HTML 4 documents - online help, readme
files, "about" pages, simple offline browsers.
Features
--------
- headings, paragraphs, <pre>, <blockquote>, alignment, horizontal rules
- text styles, <font size color face>, sub/superscript
- lists (ul/ol with all numbering types, nested; dl)
- tables with automatic column widths, colspan, rowspan, border,
cellpadding, cellspacing, width in pixels or %, align/valign, bgcolor,
captions, nested tables
- links with visited/active colours, anchors, "#anchor" links handled
by the gadget itself, link clicks reported as GADGETUP
- pictures in every format a datatype exists for (GIF transparency, PNG
alpha in htmlttf.gadget), scaled with width/height; with align=left/
right the text flows around them (hspace, vspace, br clear)
- background colours and tiled background pictures for the page, tables
and cells
- text selection with the mouse (drag, double click for a word) and
copying to the clipboard (IFF FTXT)
- Latin-1 entities, UTF-8 documents are converted automatically
- scrollers connect via ICA_TARGET/ICA_MAP, mouse wheel and keys in the
demo program
html.gadget uses the system's bitmap fonts and rounds bigger HTML font
sizes to sizes that really exist (e.g. Helvetica 9/11/13/15/18/24), so no
scaled bitmap fonts are shown. Rendering is flicker free through an
off-screen bitmap. Runs on every AmigaOS 3.2 system, 68000 and up.
htmlttf.gadget is a drop-in alternative with the same attributes that
renders anti-aliased TrueType fonts through a built-in FreeType 2.3.8
(Bitstream Vera included; DejaVu and Noto are supported as well),
composites everything in 32 bit (pictures with alpha channel) and
writes it with WritePixelArray() on RTG screens
or maps it to pens on palette screens.
Contents
--------
Install Installer script (English/German)
Classes/Gadgets/ html.gadget, htmlttf.gadget (68000)
Classes/Gadgets/68020/
htmlttf.gadget for 68020-68060 (Install picks it)
Demo/ HTMLDemo (a small browser) with example pages;
"HTMLDemo TTF" uses htmlttf.gadget
Developer/ includes (gadgets, proto, inline, clib), FD, SFD,
Autodocs
Docs/ German documentation (LiesMich.txt)
Icons/ the archive's icons as GlowIcons and NewIcons (and
the classic ones); double click UseGlowIcons,
UseNewIcons or UseClassic to switch
Source/ complete source code (C, cross compiled with
bebbo's amiga-gcc and NDK 3.2; FreeType 2.3.8 from
Aminet dev/lib/freetype-2.3.8 is needed for
htmlttf.gadget)
The demo runs directly from the archive; to use the classes in your own
programs, run the Installer script or copy Classes/Gadgets/#? to
SYS:Classes/Gadgets/.
Not supported: CSS, JavaScript, frames, forms (drawn as boxes only),
text flowing around tables, network access.
History
-------
1.2 (17.10.2026)
- printing and export: the new method HTMLM_Export writes the document
as PostScript or PDF (paper size, margins, font size, Helvetica or
Times, page numbers); text stays text, pictures with their original
pixels and transparency, pages break between lines and keep headings
with their text
- bitmap printing: HTMLM_PrintBegin/Render/End give the pages as
pixels of the sheet, in strips, e.g. for printer.device with
DRPA_SourceHook; htmlttf.gadget in the printer's resolution,
html.gadget with its bitmap fonts
- export: pictures are compressed (PDF: LZW with PNG predictors, PostScript
level 2: LZW in ASCII85), JPEG files are passed on as they are;
HTMLEX_PSLevel 1 writes PostScript level 1 for old printers;
HTMLEX_ImageDPI scales pictures down to a resolution for smaller files
- new attributes HTML_TableGrid (thin grey lines in tables without
border) and HTML_CodeStyle (grey backgrounds for code, bar for quotes),
for Markdown as GitHub shows it; off by default
- new attribute HTML_FitImages: pictures wider than the text are
scaled down to its width (like max-width: 100% in CSS), also when
printing; off by default, handy for Markdown with big screenshots
- html.gadget: scaled pictures with transparency (GIF) are drawn
correctly on planar screens (AGA)
- html.gadget: pictures with relative paths are also exported to
PostScript/PDF when the current directory has changed since loading
- faster scrolling: for a few lines the gadgets move the picture and
draw only the new strip, and they only go through the items that can
be visible; htmlttf.gadget now draws through a buffer as well
- html.gadget on palette screens: pictures are scaled in full colour
and then get the nearest pens, as in htmlttf.gadget (they were scaled
from the dithered picture, which gave coloured noise)
- palette screens: the page background and the light colours for code
and tables get pens of their own first, in both gadgets (white and the
code background could end up with the same pen), and only pens the
screen can show
- NewIcons drawn in the style of the NewIcons package (isometric, its
palette, objects on a platform); selected they show a changed picture
(open drawer, dog ear, ...) instead of a darker one
- more characters outside Latin-1 get a replacement instead of "?":
arrows (also the footnote back link of md4c, shown as ^), <=, >=, !=,
~ and primes
- HTMLDemo: export to RAM:HTMLDemo.ps / .pdf from the Project menu,
bitmap printing through printer.device;
it sets its own stack (32 KB), so it also runs without its icon
- Autodocs and ReadMe: notes on the stack an application needs and how
to set it in the code
1.1 (03.10.2026)
- tables: cells spanning several rows (rowspan)
- pictures with align=left/right, text flows around them
- html.gadget: links are underlined with every font and without gaps
between the words
- list bullets are centred vertically in the line
- htmlttf.gadget also as faster build for 68020-68060
- icons also as GlowIcons and NewIcons (drawer Icons)
- new demo pages: tables, text flow
- HTMLDemo: no crash when started from the Workbench
- checkboxes and radio buttons show their state, sized to the font
(anti-aliased in htmlttf.gadget), e.g. for Markdown task lists
- lists: type="none" on the list or an item hides the marker; a
checkbox at the start of the item takes its place (task lists)
1.0 (30.09.2026)
- first release
License
-------
MIT License, see LICENSE.
htmlttf.gadget contains FreeType: Portions of this software are copyright
(c) 2009 The FreeType Project (www.freetype.org). All rights reserved.
Bitstream Vera fonts: Copyright (c) 2003 by Bitstream, Inc., see
Licenses/Vera-COPYRIGHT.TXT.
Deutsch
-------
html.gadget und htmlttf.gadget sind öffentliche ReAction-Klassen für
AmigaOS 3.2, die einfache HTML-4-Dokumente anzeigen: Überschriften,
Listen, Tabellen, Links, Bilder über Datatypes, Text markieren und in
die Zwischenablage kopieren. html.gadget verwendet die Bitmap-Fonts des
Systems in ihren echten Größen, htmlttf.gadget geglättete
TrueType-Schriften über FreeType. Ausführliche deutsche Dokumentation:
Docs/LiesMich.txt. Installation mit dem beiliegenden Installer-Skript.
Versionsgeschichte
------------------
1.2 (17.10.2026)
- Drucken und Export: die neue Methode HTMLM_Export schreibt das
Dokument als PostScript oder PDF (Papierformat, Ränder,
Schriftgröße, Helvetica oder Times, Seitenzahlen); Text bleibt Text,
Bilder mit ihren Originalpixeln und Transparenz, Seitenumbrüche
zwischen Zeilen, Überschriften bleiben bei ihrem Text
- Bitmap-Druck: HTMLM_PrintBegin/Render/End liefern die Seiten als
Pixel des Blatts, in Streifen, z. B. für printer.device mit
DRPA_SourceHook; htmlttf.gadget in der Druckerauflösung, html.gadget
mit seinen Bitmap-Schriften
- Export: Bilder werden komprimiert (PDF: LZW mit PNG-Prädiktoren, PostScript
Level 2: LZW in ASCII85), JPEG-Dateien werden unverändert übernommen;
HTMLEX_PSLevel 1 schreibt PostScript Level 1 für alte Drucker;
HTMLEX_ImageDPI verkleinert Bilder auf eine Auflösung für kleinere Dateien
- neue Attribute HTML_TableGrid (dünne graue Linien in Tabellen ohne
border) und HTML_CodeStyle (graue Hintergründe für Code, Balken bei
Zitaten), für Markdown wie bei GitHub; abgeschaltet
- neues Attribut HTML_FitImages: Bilder, die breiter als der Text
sind, werden auf seine Breite verkleinert (wie max-width: 100% in
CSS), auch beim Drucken; abgeschaltet, praktisch für Markdown mit
großen Screenshots
- html.gadget: skalierte Bilder mit Transparenz (GIF) werden auf
planaren Bildschirmen (AGA) richtig gezeichnet
- html.gadget: Bilder mit relativem Pfad kommen auch dann ins
PostScript/PDF, wenn sich das aktuelle Verzeichnis seit dem Laden
geändert hat
- schnelleres Scrollen: bei wenigen Zeilen verschieben die Gadgets das
Bild und zeichnen nur den neuen Streifen, und sie gehen nur die
Elemente durch, die sichtbar sein können; htmlttf.gadget zeichnet
jetzt ebenfalls über einen Puffer
- html.gadget auf Palettenscreens: Bilder werden in vollen Farben skaliert
und erhalten dann die nächstliegenden Stifte, wie bei htmlttf.gadget
(bisher wurde das geditherte Bild skaliert, das gab buntes Rauschen)
- Palettenscreens: Seitenhintergrund und die hellen Farben für Code und
Tabellen erhalten in beiden Gadgets zuerst eigene Stifte (Weiß und der
Code-Hintergrund konnten denselben Stift bekommen), und nur Stifte, die
der Screen zeigen kann
- NewIcons im Stil des NewIcons-Pakets gezeichnet (isometrisch, seine
Palette, Objekte auf einem Sockel); ausgewählt zeigen sie ein geändertes
Bild (offene Schublade, Eselsohr ...) statt eines dunkleren
- mehr Zeichen außerhalb von Latin-1 erhalten einen Ersatz statt "?":
Pfeile (auch der Rücksprung aus Fußnoten von md4c, als ^), <=, >=,
!=, ~ und Striche für Minuten/Sekunden
- HTMLDemo: Export nach RAM:HTMLDemo.ps / .pdf im Menü Projekt,
Bitmap-Druck über printer.device; es
setzt seinen Stack selbst (32 KB) und läuft so auch ohne sein Icon
- Autodocs und LiesMich: Hinweise zum Stack, den eine Anwendung braucht,
und wie sie ihn im Code festlegt
1.1 (03.10.2026)
- Tabellen: Zellen über mehrere Zeilen (rowspan)
- Bilder mit align=left/right, der Text umfließt sie
- html.gadget: Links werden mit jedem Font und ohne Lücken zwischen den
Wörtern unterstrichen
- Aufzählungspunkte stehen vertikal mittig in der Zeile
- htmlttf.gadget zusätzlich als schnellerer Build für 68020-68060
- Icons zusätzlich als GlowIcons und NewIcons (Schublade Icons)
- neue Demo-Seiten: Tabellen, Textumfluss
- HTMLDemo: kein Absturz mehr beim Start von der Workbench
- Checkboxen und Radio-Buttons zeigen ihren Zustand, passend zur
Schriftgröße (in htmlttf.gadget geglättet), z. B. für
Markdown-Aufgabenlisten
- Listen: type="none" an der Liste oder einem Punkt blendet das Zeichen
aus; eine Checkbox am Anfang des Punkts tritt an seine Stelle
(Aufgabenlisten)
1.0 (30.09.2026)
- erste Veröffentlichung
|