800 Commits

Author SHA1 Message Date
Ben Harris
8a2449c697 Don't emit <LookupType> elements
TTX is quite capable of inferring the lookup type from the type of the
main child element of <Lookup>.  This should allow for specifying
different kinds of lookup using literal XML.
2025-01-08 01:58:21 +00:00
Ben Harris
7658a55c86 Generate ss0X substitutions less cleverly
These substitutions are not generated from the glyphs table, but are
specified statically.  Rather than taking a table and transforming it
into XML with C, we could just put the static XML in a string, which
is much simpler.  To avoid excessive simplicity, the string is
generated by a pile of preprocessor macros.

This causes no change to the output OTFs.
2025-01-08 01:52:55 +00:00
Ben Harris
e6f3f6e1c9 Note source of ugrave.roundjoined in a comment 2025-01-05 10:24:53 +00:00
Ben Harris
1be864fb48 Don't emit AlternateSets that will be overridden
Just in case TTX changes its behaviour in this area in the future.
2025-01-02 00:53:02 +00:00
Ben Harris
ad5c574321 Add a comment explaining the purpose of aalt_overrides 2025-01-02 00:27:50 +00:00
Ben Harris
4e7b163a32 Signal names for SN74S262 pins, from RML 380Z service manual 2025-01-01 23:54:11 +00:00
Ben Harris
1be09350cc Extend compatcheck 'GSUB' checks to handle renamed glyphs
We do this by pulling out the CFF charstring for old and new glyph
names from the new font and seeing if they're the same.
2025-01-01 23:53:51 +00:00
Ben Harris
3b65b970cb Emit AlternateSets for 'aalt' overrides
These are just emitted after the standard AlternateSets, and because
of how TTX works, they end up overriding the standard ones.  This
seems a bit dodgy to me, so I might try to do better later.
2025-01-01 23:18:13 +00:00
Ben Harris
a0e959cd37 Add data for overriding 'aalt' sometimes
Not used yet.
2024-12-30 23:15:54 +00:00
Ben Harris
3a43d22b3d Sort glyph names in compatcheck 2024-12-29 18:50:52 +00:00
Ben Harris
67e3cf9324 New shape for SAA5054 ugrave (now ugrave.roundjoined)
I just got an SAA5054 (date code 8510) and the character it has at 5/13
is different from the one in the datasheet.  The real one lacks the
pixel in the bottom right corner, so it's more like a Ugrave than a
ugrave.  However, it would be weird for a character set to include the
capital but not the lower case, and the corresponding character set in
ETS 300 706: May 1997 (the French option in table 36) is obviously
lower-case.  So I think it's semantically lower-case, whatever it looks
like.

As for the thing I was intending to check, yes the accent does join onto
the letter.
2024-12-29 18:50:52 +00:00
Ben Harris
670c0b0dd5 Add @font-feature-values to bedstead-faces.css
This means that users of this stylesheet can use declarations like
"font-variant: styleset(saa5051)" to request a particular stylistic set.
The separated graphics sets, 'ss14' and 'ss16', are not covered by this
because new applications should use the proper Unicode code points for
separated graphics instead.
2024-12-29 18:50:52 +00:00
Ben Harris
1ed20fb032 Use new generic glyph names in rom.ps
Output confirmed to be unchanged
2024-12-29 18:50:52 +00:00
Ben Harris
04f2387455 Put feature tag in a comment in each <Lookup> in TTX
Now that the ssXX features don't have fixed suffixes it's useful to
have something to say which is which.
2024-12-29 18:50:52 +00:00
Ben Harris
81c554424a Check OS/2.achVendID in compatcheck
My GNU Emacs configuration ended up using this to select its default
font, so it should remain constant within a major version.
2024-12-29 18:50:52 +00:00
Ben Harris
698683b7fa Add name checking to compatcheck
This tries to ensure that sensible ways of specifying a font by name
continue to work across an upgrade.
2024-12-29 18:50:52 +00:00
Ben Harris
9c1ad469f5 compatcheck: actually exit with failure if a check fails 2024-12-29 18:50:52 +00:00
Ben Harris
c5f74d681f Add a comment explaining what compatcheck does 2024-12-29 18:50:52 +00:00
Ben Harris
cdafa5da9e SN74S262/3 pinout
The XM11 application note mentions "two chip enables", which can only
be pins 14 and 15.
2024-12-29 18:50:11 +00:00
Ben Harris
1b620c9cef More descriptive names for variant characters
This means yet more compatibility aliases, but I think it's the right
way to go.
2024-12-29 18:50:11 +00:00
Ben Harris
177e7552a4 Redesign how stylistic sets for particular chips work
The old approach was that each stylistic set had a distinct glyph-name
suffix, the same way that small caps or right-to-left mirrored glyphs
did. This meant that when several chips used the same alternative
glyph, there needed to be a separate alias for each chip.  This was
slightly awkward for just the SAA5051 and SAA5052, but I'd like to add
coverage for the SN74S262 and SN74S263, and those share some of the
same glyphs as well.

So now those stylistic sets have an explicit list of which variant
glyphs they include, and my plan is that each variant glyph will have
a single canonical name.  They'll still have to keep the existing
names for compatibility.  Indeed, for now that's what they're using
because that makes checking the output easier.

No change to the resulting font, though the lookups do end up in a
different order in the TTX file.
2024-12-29 18:50:11 +00:00
Ben Harris
fa50e22c98 Swap scripts and suffix members of struct gsub_feature
Every feature must have a scripts list, but "suffix" is only one way
you might select lookups to generate.  Putting it at the end makes it
easier to leave it out.  Indeed, our existing 'aalt' lookup omits it.

This causes no change to the generated fonts.
2024-12-29 18:50:11 +00:00
Ben Harris
602db761c2 Remove ASCII dependency
ISO C doesn't guarantee that the execution character set is ASCII, or
anything like it.  Bedstead tries to require only ISO C, but it used
strcmp() to sort glyph names and so the output depended on the sort
order of characters.  Moreover, the code for finding variants of
characters required that '.' have a lower value than any other
character that appeared in glyph names.

To avoid this dependency, we now have a table that assigns values to
each character that can appear in glyph names, and a strcmp-compatible
function that compares two strings after mapping through that table.
This means that our sort order is explicitly specified in the code,
and also provides a convenient place to catch unusual characters in
glyph names.

This change has no effect on the output TTX files (at least on an ASCII
system).  All remaining uses of strcmp() are testing solely for
equality.
2024-12-29 18:50:11 +00:00
Ben Harris
9b82a0f264 Correct the size of the parameter to glyph_footprint() 2024-12-16 22:27:24 +00:00
Ben Harris
f68916e9ef Fix the length of an accidentally variable-length array 2024-12-16 22:22:01 +00:00
Ben Harris
d9380d5835 Range-check argument to --bdfgen 2024-12-16 21:49:16 +00:00
Ben Harris
61967c8094 Change parameters of moveto() and lineto() to signed
The corresponding members of struct vec are signed, as are most of the
arguments passed to the functions, so it's silly that the parameters
themselves are unsigned.  This takes the number of warnings under
clang -Weverything down from 126 to 30.

This doesn't cause any change to the output TTX files.
2024-12-16 21:40:36 +00:00
Ben Harris
8ff354a9fd Remove an unnecessary shadowing variable 2024-12-16 21:31:21 +00:00
Ben Harris
32e6fd7599 Add a few missing "static" keywords 2024-12-16 21:26:35 +00:00
Ben Harris
5b758ec94c compatcheck: detect vanished code points from fonts 2024-12-14 16:43:06 +00:00
Ben Harris
ba81f7454c Add a script to check backward compatibility 2024-12-14 16:06:18 +00:00
Ben Harris
f16df5983c Some notes on TIFAX 2024-12-11 22:34:53 +00:00
Ben Harris
e92f9f7ece Note the existence of HACKING in CONTRIBUTING 2024-12-09 21:45:36 +00:00
Ben Harris
50d265d5c4 Small caps for new additions 2024-12-08 18:48:30 +00:00
Ben Harris
2b15178fcc A few modified Bs 2024-12-08 18:19:52 +00:00
Ben Harris
da53054c5c Assign a PUA code point to Tbar.c2sc 2024-12-03 18:44:07 +00:00
Ben Harris
a8c4150d5c Merge new characters and minor fixes
Converted to the new string-constant format in the process.
2024-12-03 18:43:48 +00:00
Neil Williamson
05ec415b07 A few additions, mostly to fill out Teletext character sets
[ from email ]

2. Regular unicode characters: a few additions, mostly to fill out
compatibility with Teletext character set ranges that were otherwise
almost-complete (which is basically everything except Arabic at this point)
per this reference page: https://al.zerostem.io/~al/ttcharset/[al.zerostem.io]  
Some of the cyrillic additions are a bit dubious, but hopefully close enough
to pass.
2024-12-03 18:26:23 +00:00
Ben Harris
f921f1ec6f Add some warning flags to the C compiler
I've chosen ones under which bedstead.c is currently clean, at least
using the versions of GCC and Clang currently in Debian stable.
2024-12-03 13:58:25 +00:00
Ben Harris
f7e70aaf5f Correct a printf %lX argument type
Also change another from "long" to "unsigned long" for consistency.
2024-12-03 13:07:01 +00:00
Ben Harris
03b881a394 Set -dNOSAFER when running .bdf.ps programs
Ghostscript 10.03.1 and later disable the "makeimagedevice" operator
when running under -dSAFER.  Even --permit-devices='*' isn't enough to
get it back.  The release notes say that makeimagedevice has been
removed entirely, but that seems not to be correct.
2024-11-27 21:01:25 +00:00
Ben Harris
8070fb1300 Stop using %stdout for writing BDF files
Instead, pass the destination filename to the bdf.ps program and have it
open the file itself.  This avoids capturing Ghostscript's own
diagnostics in the output file.
2024-11-27 10:51:38 +00:00
Ben Harris
1c8361d200 Correct a comment in rom.ps
It can make all ROM images now.
2024-11-27 10:30:20 +00:00
Ben Harris
3b71d537b4 Convert ZVBI Private Use codepoints to compatibility aliases
That saves 4K of font file, which is nice.
2024-11-26 22:11:11 +00:00
Ben Harris
cc6bbbd87c Correct compatibility mapping of Wdieresis.sc
It will be generated if 'smcp' is applied to Wdieresis, and the
correct result of that is no change, since 'smcp' doesn't affect
capitals.
2024-11-26 21:06:51 +00:00
Ben Harris
54dbe30e7f Convert 6-cell ".sep6" glyphs into compatibility aliases 2024-11-26 20:59:47 +00:00
Ben Harris
6ce0438546 Add COMPAT to a bunch more aliases 2024-11-26 20:29:09 +00:00
Ben Harris
0cb087c526 Add a flag to explicitly mark compatibility aliases
Only used on a few characters for now, though.
2024-11-26 14:34:15 +00:00
Ben Harris
a2a863c12b Mark obsolete characters in the glyph complement
A technique only slightly spoiled by the fact that nothing flags
obsolete characters yet, so it's actually marking every alias instead.
Still, it puts a nice diagonal bar across the affected characters
telling you to use a different one, which looks nice but may
obliterate the character rather _too_ effectively.
2024-11-26 02:03:23 +00:00
Ben Harris
8790478527 Actual aliases for old names of separated 4-cell graphics
That saves a few hundred bytes from the OTF.
2024-11-25 22:44:19 +00:00