[TextMate] My little remarks on TextMate - Encodings, CJK Characters, Ligatures
Vincent Isambart
vincent.isambart at laposte.net
Thu Oct 7 20:32:50 UTC 2004
Hello,
First thanks to Allan for all the great work on TextMate ^o^.
Sorry if any of you in the mailing list do not like long mails. If you
do not want to read it, just jump to the next mail in you mail box ;-)
And sorry for putting so many things in one mail, but one mail is
easier to skip or remove than 3 or 4 ;-)
So there are my list of remarks about TextMate. They do not mean that I
do not like them program. On the contrary, I just want it to be even
better ^o^. Feel free to criticize any of them (except the first one).
First, I do not really care if the preferences are in there own dialog
box or in the menus. In the menus, it has the advantage of being faster
to change. But with the feature list that will certainly grow in the
future, some things will certainly have to be put in a separate dialog
box. (And no, do not reply to this paragraph, as it has already become
a troll on this mailing list ;-))
'Re-open with encoding' is great but the encodings list is quite short.
UTF-32 is not even there. If someone works a little with Japanese text,
he will need Shift-JIS and EUC-JP. Someone with Chinese text might want
Big5. Even a westerner wanting to use the euro symbol might want
ISO-8859-15. The best would be to be able to add or remove encodings in
the list. The same thing would be great in the 'Save' dialog (the list
should be the same in both places and be editable at both places). And
adding it in the 'Open' dialog would be great too.
Little bug : if we select 'other' in the View->Tabs Size menu, nothing
happens. There should be a dialog box asking for the number of spaces
you want.
An other little problem I have is the drawing of CJK characters. These
characters are wider than latin characters and as they are drawn today
in TextMate, a character may overlap with the previous and next one. In
terminals, this is generally handled by making them double-width. In
SubEthaEdit, it is quite strange as they are not fixed size at all,
some are larger than others. If you want any screenshot, example, just
ask.
Note that I am in no way good in Chinese, Japanese or Korean, I just
made a few Ruby scripts to help me train my Japanese, and they do
include some Japanese characters.
For the ligatures problem, if it has not been corrected in the sources
yet, it's quite easy to correct:
If you want ATSUI not to use common english ligatures (fi, fl):
ATSUFontFeatureType type = kLigaturesType;
ATSUFontFeatureType selector = kCommonLigaturesOffSelector;
ATSUSetFontFeatures(myATSUStyle, 1, &type, &selector);
and if you do not want any type of ligature:
ATSUFontFeatureType types[9] =
{
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType,
kLigaturesType
};
ATSUFontFeatureType selectors[9] =
{
kRequiredLigaturesOffSelector,
kCommonLigaturesOffSelector,
kRareLigaturesOffSelector,
kLogosOffSelector,
kRebusPicturesOffSelector,
kDiphthongLigaturesOffSelector,
kSquaredLigaturesOffSelector,
kAbbrevSquaredLigaturesOffSelector,
kSymbolLigaturesOffSelector
};
ATSUSetFontFeatures(myATSUStyle, 9, types, selectors);
Some info there :
http://developer.apple.com/documentation/Carbon/Conceptual/
ATSUI_Concepts/atsui_app_features/chapter_9_section_15.html (be
careful, the feature selector names on this web page are not all good)
It will also disable ligatures for Hindi or Arabic script, but as
TextMate's goal is not seem to be a multi-lingual editor... (but it
would be great if it could at least manage the CJK characters well ;-))
Last thing: having a direct link to
http://lists.macromates.com/mailman/listinfo or at least to the
archives of the mailing list
(http://one.textdrive.com/pipermail/textmate/) on TextMate's web page
would really be great. I only found it after subscribing to the mailing
list, in the mail asking for confirmation.
Cheers,
Vincent Isambart
More information about the textmate
mailing list