Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 44317 - Anjuta garbles source files in editor window
Summary: Anjuta garbles source files in editor window
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Lisa Seelye (RETIRED)
Depends on:
Reported: 2004-03-10 20:00 UTC by Joel Parker
Modified: 2005-03-19 07:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---

Screenshot showing Anjuta and gvim (Screenshot.png,178.54 KB, image/png)
2004-03-10 20:02 UTC, Joel Parker
Screenshot with/without syntax highlighting (Screenshot.png,58.23 KB, image/png)
2004-03-12 20:32 UTC, Joel Parker

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Parker 2004-03-10 20:00:36 UTC
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
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.7.7
CFLAGS="-Os -march=pentium4 -fomit-frame-pointer -pipe"
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"
FEATURES="autoaddcvs ccache sandbox"
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"
Comment 1 Joel Parker 2004-03-10 20:02:32 UTC
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.
Comment 2 foser (RETIRED) gentoo-dev 2004-03-11 13:22:19 UTC
Any cl output or something more helpful than a weird screenie. It could be anything.
Comment 3 Joel Parker 2004-03-11 13:31:46 UTC
The only console output is this:

$ anjuta cursoricon.c
** Message: Initializing AP class
** Message: Initializing AP Instance
** Message: Initializing launcher class
Comment 4 Joel Parker 2004-03-12 20:32:00 UTC
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
Comment 5 Lisa Seelye (RETIRED) gentoo-dev 2004-03-13 18:40:26 UTC
If you scroll the file (or force the file to be redrawn on the screen) does this clear up at all?
Comment 6 Joel Parker 2004-03-13 22:21:38 UTC
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.
Comment 7 Joel Parker 2004-03-13 22:23:16 UTC
Oh, and scrolling a long program doesn't help either.
Comment 8 foser (RETIRED) gentoo-dev 2004-03-14 05:32:07 UTC
And if you set another font for the document text ?
Comment 9 Joel Parker 2004-03-14 07:22:46 UTC
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.
Comment 10 Lisa Seelye (RETIRED) gentoo-dev 2004-04-08 13:51:32 UTC
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?
Comment 11 Joel Parker 2004-04-09 22:11:14 UTC
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 ./
(cd ../global-tags; ./
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
Comment 12 Lisa Seelye (RETIRED) gentoo-dev 2004-04-10 00:24:02 UTC
emerge sync in about a half hour from this comment's timestamp and emerge >=anjuta-1.2.0-r1 and report back
Comment 13 Lisa Seelye (RETIRED) gentoo-dev 2004-04-10 00:24:45 UTC
btw, the problem in comment 11 was related to bug 46824
Comment 14 Joel Parker 2004-04-10 10:46:58 UTC
anjuta-1.2.0-r1 merged fine, but the original problem remains.
Comment 15 Joel Parker 2004-04-18 11:49:19 UTC
I just tried anjuta-1.2.2, but no luck. Syntax-highlighted C files are still garbled beyond recognition.
Comment 16 Joel Parker 2004-04-18 11:57:38 UTC
Does anjuta use scintilla for its syntax highlighting? I just tried scite (which also uses scintilla), and it worked fine.
Comment 17 Moonshade 2004-05-22 11:44:59 UTC
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.
Comment 18 Joel Parker 2004-05-22 12:41:24 UTC
Interesting. I'll check this out soon.
Comment 19 Joel Parker 2004-06-13 14:32:43 UTC
Confirmed. This problem only occurs when using Microsoft's Courier font.
Comment 20 foser (RETIRED) gentoo-dev 2004-06-15 06:12:21 UTC
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.
Comment 21 Joel Parker 2004-06-15 07:52:37 UTC
Yeah, true... That was with version 1.2.0, this is 1.2.2. I'll test more when I get home.
Comment 22 Joel Parker 2004-06-15 17:26:17 UTC
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.
Comment 23 Joel Parker 2004-06-19 10:42:24 UTC
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.
Comment 24 Joel Parker 2004-07-07 08:42:41 UTC

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?
Comment 25 foser (RETIRED) gentoo-dev 2004-07-20 02:48:30 UTC
it might be freetype problem then ? what version are you using.

I don't have any .fon files around, so I can't test.
Comment 26 Joel Parker 2004-07-20 06:16:06 UTC
Perhaps. I've been trying to work it out; I'll report back if I find anything.
Comment 27 Lisa Seelye (RETIRED) gentoo-dev 2004-12-14 15:05:30 UTC
Ping @ comment #26
Comment 28 Joel Parker 2004-12-14 15:59:13 UTC
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 29 Lisa Seelye (RETIRED) gentoo-dev 2005-03-19 07:26:15 UTC
comment 28 seems to say it all.