Loading ...
Sorry, an error occurred while loading the content.

macatsui vs. multi-byte character display

Expand Messages
  • Ned Konz
    I ve got a version of 7.0.017 that I ve built with: VIM - Vi IMproved 7.0 (2006 May 7, compiled May 25 2006 13:13:10) MacOS X (unix) version Included patches:
    Message 1 of 3 , May 30 1:33 PM
    • 0 Attachment
      I've got a version of 7.0.017 that I've built with:

      VIM - Vi IMproved 7.0 (2006 May 7, compiled May 25 2006 13:13:10)
      MacOS X (unix) version
      Included patches: 1-17
      Compiled by ned@...
      Normal version with Carbon GUI. Features included (+) or not (-):
      -arabic +autocmd -balloon_eval +browse +builtin_terms +byte_offset
      +cindent -clientserver +clipboard +cmdline_compl
      +cmdline_hist +cmdline_info +comments +cryptv -cscope +cursorshape
      +dialog_con_gui +diff +digraphs -dnd -ebcdic
      -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
      +find_in_path +folding -footer +fork() +gettext
      -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall
      +linebreak +lispindent +listcmds +localmap
      +menu +mksession +modify_fname +mouse -mouseshape -mouse_dec -mouse_gpm
      -mouse_jsbterm -mouse_netterm +mouse_xterm
      +multi_byte +multi_lang -mzscheme -netbeans_intg +osfiletype +path_extra
      -perl +postscript +printer -profile +python
      +quickfix +reltime -rightleft +ruby +scrollbind -signs +smartindent
      -sniff +statusline -sun_workshop +syntax
      +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse
      +textobjects +title -toolbar +user_commands
      +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
      +wildignore +wildmenu +windows +writebackup -X11
      -xfontset -xim -xsmp -xterm_clipboard -xterm_save
      system vimrc file: "$VIM/vimrc"
      user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "$VIM/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM:
      "/Applications/DarwinPorts/Vim/Vim.app/Contents/Resources/vim"
      Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MAC
      -fno-common -fpascal-strings -Wall -Wno-unknown-pragmas
      -mdynamic-no-pic -pipe -I. -Iproto -I/opt/local/include -DMACOS_X_UNIX
      -no-cpp-precomp -I/Developer/Headers/FlatCarbon
      -O3
      -I/opt/local/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4

      -I/opt/local/include/python2.4
      -I/opt/local/lib/ruby/1.8/powerpc-darwin8.5.0
      Linking: gcc -L/opt/local/lib -L/opt/local/lib -L/usr/local/lib -o Vim
      -framework Carbon -lncurses -liconv -lintl -framework Python
      -lruby -lobjc


      I'm having problems with the display of multibyte characters.

      When I use 'macatsui', everything looks fine (say ":digraphs"). But then
      I don't get antialiased text.

      gvim -U NONE -u NONE -c 'set encoding=utf-8 macatsui' -c 'set
      guifont=Andale\ Mono:h12'


      When I use 'nomacatsui', the text looks nice and antialiased, but the
      characters are messed up when I use any encoding other than 'macroman',
      which is not an encoding that I see myself needing. For instance, the
      output of "digraphs" with encoding=utf-8 will show multiple glyphs where
      it should show single ones, and with encoding=latin1 the characters are
      just wrong.

      gvim -U NONE -u NONE -c 'set encoding=utf-8 nomacatsui' -c 'set
      guifont=Andale\ Mono:h12 antialias'


      Please see the pictures at http://bike-nomad.com/vim/macatsuibug.html

      Does anyone know how to get *both* nice looking text and proper
      characters in encodings other than 'macroman'?

      --
      Ned Konz
      ned@...
      http://bike-nomad.com
    • Jun T.
      If you are using Andare Mono, then the following patch will enable antialiasing with macatsui: ... +++ v1/gui_mac.c 2006-05-31 20:46:49.000000000 +0900
      Message 2 of 3 , May 31 5:25 AM
      • 0 Attachment
        If you are using Andare Mono, then the following patch will enable
        antialiasing with macatsui:

        ============================================================================
        --- org/gui_mac.c 2006-05-03 00:11:53.000000000 +0900
        +++ v1/gui_mac.c 2006-05-31 20:46:49.000000000 +0900
        @@ -3408,8 +3408,10 @@
        /* No antialiasing by default (do not attempt to touch antialising
        * options on pre-Jaguar) */
        fontOptions =
        +#if 0
        (gMacSystemVersion >= 0x1020) ?
        kATSStyleNoAntiAliasing :
        +#endif
        kATSStyleNoOptions;

        ATSUAttributeTag attribTags[] =
        ============================================================================

        In the original code, antialiasing is intentionally turned off with
        ATSUI rengering, because it causes problems in some fonts such as
        Monaco. Andare Mono has no "advanced" features like ligatures etc.,
        so I guess you will see no problem with the above patch.

        If you see some rendering proglem, or if you want to use Monaco font,
        then the following additional patch will make the situation better
        (but it has been reported that Monaco still has some problem even
        with this patch, although I can't reproduce the problem)

        ============================================================================
        --- v1/gui_mac.c 2006-05-31 20:46:49.000000000 +0900
        +++ v2/gui_mac.c 2006-05-10 17:48:44.000000000 +0900
        @@ -4027,6 +4027,14 @@
        (gFontStyle ? &gFontStyle : NULL),
        &textLayout) == noErr)
        {
        + ATSUAttributeTag tags[] = {kATSULineLayoutOptionsTag};
        + ByteCount sizes[] = {sizeof(ATSLineLayoutOptions)};
        + /*XXX is this the correct options? */
        + ATSLineLayoutOptions opts = kATSLineUseDeviceMetrics
        + | kATSLineDisableAllLayoutOperations;
        + ATSUAttributeValuePtr values[] = {&opts};
        + ATSUSetLayoutControls(textLayout, 1, tags, sizes, values);
        +
        ATSUSetTransientFontMatching(textLayout, TRUE);

        ATSUDrawText(textLayout,
        ============================================================================
      • Ned Konz
        ... Thank you! This looks very good to me, even with Monaco (using both patches). -- Ned Konz ned@bike-nomad.com http://bike-nomad.com
        Message 3 of 3 , Jun 3, 2006
        • 0 Attachment
          Jun T. wrote:
          > If you are using Andare Mono, then the following patch will enable
          > antialiasing with macatsui:
          >
          > ============================================================================
          > --- org/gui_mac.c 2006-05-03 00:11:53.000000000 +0900
          > +++ v1/gui_mac.c 2006-05-31 20:46:49.000000000 +0900
          > @@ -3408,8 +3408,10 @@
          > /* No antialiasing by default (do not attempt to touch antialising
          > * options on pre-Jaguar) */
          > fontOptions =
          > +#if 0
          > (gMacSystemVersion >= 0x1020) ?
          > kATSStyleNoAntiAliasing :
          > +#endif
          > kATSStyleNoOptions;
          >
          > ATSUAttributeTag attribTags[] =
          > ============================================================================
          >
          > In the original code, antialiasing is intentionally turned off with
          > ATSUI rengering, because it causes problems in some fonts such as
          > Monaco. Andare Mono has no "advanced" features like ligatures etc.,
          > so I guess you will see no problem with the above patch.
          >
          > If you see some rendering proglem, or if you want to use Monaco font,
          > then the following additional patch will make the situation better
          > (but it has been reported that Monaco still has some problem even
          > with this patch, although I can't reproduce the problem)
          >

          Thank you!

          This looks very good to me, even with Monaco (using both patches).

          --
          Ned Konz
          ned@...
          http://bike-nomad.com
        Your message has been successfully submitted and would be delivered to recipients shortly.