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

Anti-aliasing rendering artifacts (bug)

Expand Messages
  • Darrell Nash
    Hello, first time posting so please let me know if I m in the wrong place. I believe there s a minor rendering bug for specific fonts and sizes (and then only
    Message 1 of 1 , Dec 22, 2006
    • 0 Attachment
      Hello, first time posting so please let me know if I'm in the wrong
      place.


      I believe there's a minor rendering bug for specific fonts and sizes
      (and then only with anti-aliasing). It appears for me when I'm
      paging around a code file that contains underscores - the anti-
      aliasing for certain fonts seems to make the underscore extend out
      slightly below where Vim thinks it should. So when it tries to clear
      that space to redraw new characters, it leaves a hint of the underscore.

      Example Settings:
      :set guifont=Andale\ Mono:h10
      :set antialias

      Load up a code file that has lots of underscores, and try jumping
      back and forth (<C-F>, <C-B>). On my setup, some of the underscores
      are "left behind" (although others are not).

      I'm using the latest Vim from svn.


      I was able to "fix" it by adding an extra pixel to bottom of the
      EraseRect() calls in gui_mac.c:
      eg.
      rc.bottom = FILL_Y(row2 + 1)
      becomes:
      rc.bottom = FILL_Y(row2 + 1) + 1

      in three spots: draw_string_QD(), gui_mch_clear_block(), and
      draw_string_ATSUI() (for good measure).

      However, it's not a proper fix, as now an extra line gets cleared
      regardless, so status lines and split-lines will sometimes show a
      extra cleared row of pixels (this is definitely better than rogue
      underscores, but it's not perfect).


      -Darrell.



      -----
      My Setup:
      Mac OS X 10.4.8 (PPC)

      Vim VIM - Vi IMproved 7.0 (2006 May 7, compiled Dec 22 2006 16:06:01)
      MacOS X (unix) version
      Included patches: 1-178
      Compiled by nash@...
      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/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-n
      o-pic -pipe -I. -Iproto -DMACOS_X_UNIX -no-cpp-precomp -I/Developer/
      Headers/FlatCarbon -O2 -fno-strength-reduce -Wall -Wmissing-p
      rototypes
      Linking: gcc -L/usr/local/lib -o Vim -framework Carbon -lncurses
    Your message has been successfully submitted and would be delivered to recipients shortly.