Bug 11985 - Some characters are inserted into the buffer but not visible
Summary: Some characters are inserted into the buffer but not visible
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: Future Cycle (TBD)
Assignee: Cody Russell
: 13449 ()
Depends on:
Reported: 2013-04-26 07:04 UTC by Marek Habersack
Modified: 2017-06-23 09:25 UTC (History)
3 users (show)

Tags: gtk
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 11985 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Marek Habersack 2013-04-26 07:04:08 UTC
The current master builds of XS make the | and ' characters visible in the buffer. Also, the ! character is highlighted as a keyword.
Comment 1 Marek Habersack 2013-04-29 06:29:12 UTC
the characters are _invisible_ of course :)
Comment 3 Mike Krüger 2013-05-03 03:39:28 UTC
I think it's a problem in the gtk installation or some different thing in gtk. I can't repro that. 
Does it still happen ? If so - can you provide a screenshot ?
Comment 4 Marek Habersack 2013-05-08 03:38:45 UTC
Turns out the problem is with fonts. I've been using Ubuntu Mono for over a year with XS on Mac and, until recently, it worked fine. Switching to a different font mostly works. The characters are visible but there are rendering glitches (see http://www.screencast.com/t/lRid5qvN6Gb and note that the || pairs aren't rendered correctly - this screenshot was taken using Apple's Mendel font).
Comment 5 Mike Krüger 2013-05-08 04:56:24 UTC
font not rendering correctly -> I assume a pango issue.
Comment 6 Mikayla Hutchinson [MSFT] 2013-05-08 15:12:00 UTC
Can you clarify what the problem is here?

It looks to me like the pipes are being rendered 4 subpixels wide so you're getting a single column of red/blue subpixels on the side - but that's up to Apple's CoreText, and the font's hinting. How does Xcode render the same font?
Comment 7 Mike Krüger 2013-05-08 15:36:35 UTC
The problem is that some chars are not displayed like | ... this is a bug.
Comment 8 Mike Krüger 2013-05-08 15:36:56 UTC
btw. Ubuntu Mono font shows the issue.
Comment 9 Mikayla Hutchinson [MSFT] 2013-05-08 16:19:13 UTC
But they *are* displayed in the screenshot...
Comment 10 Mike Krüger 2013-05-08 17:45:49 UTC
Wrong font - see the #1 comment - that's the issue.
Comment 11 Marek Habersack 2013-05-09 02:40:05 UTC
(In reply to comment #9)
> But they *are* displayed in the screenshot...

It shows a rendering glitch when I switched to a font different than Ubuntu Mono. With Ubuntu Mono the pipe characters (and in some contexts the apostrophe) are not visible at all. It's not a CoreText issue since everything worked fine till perhaps 2 weeks ago at which point I switched temporarily to Mono/master and after that the problems started. Switching back to Mono 3.0.9 I used before doesn't help, but switching to 2.10.x does. Thus Mike's suggestion it's a Pango issue.

Regarding XCode (and other apps - like plain Emacs or Aquamacs, Font Book) - the font works fine.
Comment 12 Mike Krüger 2013-07-25 01:01:29 UTC
*** Bug 13449 has been marked as a duplicate of this bug. ***
Comment 13 Cody Russell 2013-08-19 00:48:04 UTC
I believe I've tracked this down to the following commit in MD: e3b27a3546be6dbbee98dff2da8f45ab427402e7

In particular, this line:

-                                               cr.Translate (width / 2, height / 2);
+                                               cr.Translate (width / 2 + 1, height / 2 - 1);

If I revert back to that commit and change that line then the text rendering doesn't seem to be clipped.

The code has changed quite a bit since then though, and I haven't yet managed to trace this through the commits to find what to change in the current source.  Will investigate this further in the morning.
Comment 14 Marius Ungureanu 2016-11-03 09:11:00 UTC
Do we have any resolution for this bug?
Comment 15 Cody Russell 2016-12-01 19:49:25 UTC
It's not resolved yet, but we did change the default font so that the first use experience isn't affected by this bug.