When I open a C source file in a new Anjuta 1.2.0 install with default settings, the text appears horribly garbled, with comments even missing. The same file displays correctly in gvim. I've attached a screenshot that shows both side by side. Reproducible: Always Steps to Reproduce: Portage 2.0.50-r1 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r7) ================================================================= System uname: 2.4.22-gentoo-r7 i686 Mobile Intel(R) Pentium(R) 4 CPU 3.06GHzGentoo Base System version 1.4.3.13 Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirror.tucdemonic.org/gentoo/ http://gentoo.ccccom.com http://cudlug.cudenver.edu/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi apm arts avi berkdb bonobo cdr cjk crypt cups dvdr encode esd foomaticdb gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml guile imlib java jpeg libg++ libwww mad mikmod mmx motif mozilla mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png ppds python quicktime readline samba sdl slang spell sse ssl svga tcpd tiff truetype usb vim-with-x x86 xml2 xmms xv zlib"
Created attachment 27188 [details] Screenshot showing Anjuta and gvim This is a screenshot showing the same C source file being shown in Anjuta 1.2.0 and gvim 6.2.
Any cl output or something more helpful than a weird screenie. It could be anything.
The only console output is this: $ anjuta cursoricon.c ** Message: Initializing AP class ** Message: Initializing AP Instance ** Message: Initializing launcher class $
Created attachment 27273 [details] Screenshot with/without syntax highlighting Here's a new screenshot showing two Anjuta windows side-by-side with the same code in the editor window. The only difference is that in the one on the right, I selected Format > Force Highlight Style > C and C++. The same effect happens if I were to save the file as test.c, forcing Anjuta to go into C highlighting mode.
If you scroll the file (or force the file to be redrawn on the screen) does this clear up at all?
Nope, none of that helps. When syntax highlighting kicks in (like in the 2nd screenshot), the text appears garbled even after switching virtual desktops, hiding and showing the window, minimizing/maximizing, etc. If I manually turn off highlighting, it returns to normal, then gets garbled again when I turn it back on.
Oh, and scrolling a long program doesn't help either.
And if you set another font for the document text ?
I just tried the default, Monospace, and Tahoma, each time enabling and disabling highlighting. All of them showed the same problem when highlighting was enabled.
I'm about at the end of my ideas here... does a recompile of anjuta help at all ? for the gnome guys: has anything similar to this come up before in other applications?
I tried a remerge of anjuta: # emerge anjuta [...] cd ../global-tags && make system.tags make[4]: Entering directory `/var/tmp/portage/anjuta-1.2.0/work/anjuta-1.2.0/global-tags' echo "Detecting header files and Generating global symbols ....." Detecting header files and Generating global symbols ..... chmod +x ./create_global_tags.sh (cd ../global-tags; ./create_global_tags.sh) make[4]: *** [system.tags] Error 139 make[4]: Leaving directory `/var/tmp/portage/anjuta-1.2.0/work/anjuta-1.2.0/global-tags' make[3]: *** [system.tags] Error 2 make[3]: Leaving directory `/var/tmp/portage/anjuta-1.2.0/work/anjuta-1.2.0/data' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/var/tmp/portage/anjuta-1.2.0/work/anjuta-1.2.0/data' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/anjuta-1.2.0/work/anjuta-1.2.0/data' make: *** [install-recursive] Error 1 !!! ERROR: dev-util/anjuta-1.2.0 failed. !!! Function einstall, Line 388, Exitcode 2 !!! einstall failed #
emerge sync in about a half hour from this comment's timestamp and emerge >=anjuta-1.2.0-r1 and report back
btw, the problem in comment 11 was related to bug 46824
anjuta-1.2.0-r1 merged fine, but the original problem remains.
I just tried anjuta-1.2.2, but no luck. Syntax-highlighted C files are still garbled beyond recognition.
Does anjuta use scintilla for its syntax highlighting? I just tried scite (which also uses scintilla), and it worked fine.
Had this problem, resolved by removing <winxp partition>/windows/fonts from font dir list. "Courier 12" font which is default for Anjuta didn't display correctly.
Interesting. I'll check this out soon.
Confirmed. This problem only occurs when using Microsoft's Courier font.
ehm... I asked in #8 to change fonts & there (#9) it is implied that it doesn't make a difference ? With what you are saying it may be a problem in the xft/fc/freetype chain, instead of anjuta itself.
Yeah, true... That was with version 1.2.0, this is 1.2.2. I'll test more when I get home.
Well, it's undeniable. On my system, with Anjuta 1.2.2, Courier 12 triggers the bug, but any other font (and any other size of Courier) renders fine. I have XFree86 4.3.0 with TTF fonts, plus directly-copied WinXP fonts in /usr/local/share/fonts.
OK, this can't be an Anjuta problem. I just started up Quanta+, and it has the same problem when the font is set to Courier 12.
Update: The font in question here is Courier, not Courier New. I copied all my fonts over from my Windows XP Home partition, and from what I can tell, Courier is a .fon file (meaning bitmap). So this probably has something to do with how FreeType2 deals with Windows bitmap fonts. Does anyone have any idea on where to go from here?
it might be freetype problem then ? what version are you using. I don't have any .fon files around, so I can't test.
Perhaps. I've been trying to work it out; I'll report back if I find anything.
Ping @ comment #26
Best solution I've found is "don't use .fon files". I haven't really had much interesting in getting into freetype and all that. But I guess it may be worth a shot...
comment 28 seems to say it all.