This effectively reverts 77582aa823
and fixes mcluhan-win that is checking fonts for presence in this manner
in its startup movie:
if the textFont of field 4 < "McLuhan13" then
alert("The provided McLuhan fonts are not installed. Please reinstall Understanding McLuhan.")
quit()
end if
In this case, we need to ignore the font formatting as there could be
a leftovver from the previous edits.
We also recalculate the dimensions to the minimal height as that is used
as basis for textbox extension during edits or text inserts.
Fixes 'number of chars' in 'Lingo Workshop'
There is now _rtext, an untouched copy of the original data.
For compatibility, _ftext and _ptext are kept the same.
In addition, this change removes most of the workaround logic from
b_installMenu, as it can now parse the menu string directly.
installMenu loads a menu definition from a text cast member. In our
implementation, at load time we coerce the contents to Unicode based on
the platform encoding. Unfortunately for us, Macromedia decided to use
two non-ASCII codepoints for indicating checkmarks and code separators,
which are evaluated as the byte value instead of whatever physical
character they correspond to.
Amending this is slightly hacky, as the UTF-8 equivalent of these
codepoints is two bytes long. The text is first normalised to remove the
platform transformation. The checkmark UTF-8 sequence is replaced with
the single byte equivalent, to maintain compatibility with MacMenu.
Finally, the code separator UTF-8 sequence is used to split the line
between menu definition and script definition.
Fixes the menu system in Eastern Mind.
The previous way I handled the FXmp mappings overcomplicated MacText.
It also resulted in behavior different from the original Director. With
the previous implementation, if a Win movie with Arial text was opened
with the platform set to Mac, the textFont of field 1 would return
Arial, while it would return the mapped font name Helvetica in the
original. This implementation's behavior should match the original.