Minor bug: fonts overlaps icon details

Hi. I've noticed that with the default font (Microsoft Sans Serif, 8px), the font overlaps (the right part of) the file icon.

However, it looks good with 7px and anything below, as well as 10px and anything above - neither of which I'm comfortable with.

Microsoft Sans Serif, 8px (bad result)

Microsoft Sans serif, 7px (good result)

Oh, I should also note that some characters are larger than other. So it even depends on which character is first in the name.

In reality, the file/folder names are a little too close to the icons overall. Could you adjust it according to the spacing in Windows Explorer? Or perhaps you could even allow adjusting it in the program settings, in case someone is as picky as me.

Which version of Windows/Opus has Microsoft Sans Serif as the default font?

For me the default fonts are Tahoma on XP and Segoe UI on Vista and Win 7.

Maybe it varies by locale? I have only tested with the English locale.

Anyway, this seems like a bug in the font itself to me. Opus tells it to draw the label within a rectangle and it actually starts drawing two pixels to the left of there. I modified Opus to draw a dotted line on the left edge of the rectangle (extended above and below so it is easier to see), which makes clear what is happening:


The bar on the font's f character is being drawn outside of the rectangle we tell the font to draw into. The background behind the font is erased in this case as Opus has calculated that it should be the same as the background of the file display, and speeds things up by telling Windows to paint the font with a solid background (instead of a transparent background so the letters appear on top of whatever is below them).

(With ClearType, it's normal, and accounted for, for the antialiasing on a font to extend one pixel outside the left or right edge of the requested rectangle, but the f in this font is extending two pixels out, which is highly unusual if not outright incorrect.)

I guess we can change this so that the background is cleared by Opus and the font then drawn on top (which we already do if there is a background image to draw over; avoiding that when it isn't needed just makes things a bit quicker). That would stop the icon being clipped, but it would not fix the overly-tight spacing that results from the f character starting too far to the left, which is a "feature" of the font itself.

None of the other fonts I've tried (Tahoma, Segoe UI, Arial, ...) in both 8pt and 9pt exhibit this problem, FWIW.

I'll make this change since, on further testing, I've found a similar problem happens with the lowercase 'j' in Segoe UI, if you also have themed item selection turned off.

Hmm, well I'm using Opus 10.0.5.0.4497.x86 on Windows XP SP3 (the first retail version, and I have not downloaded any updates from Windows Update, other than .NET Framework dependencies and whatnot for some programs).

The first time I've changed anything in the font settings was when I made this thread, so I'm positive it was the font which was automatically set when I installed Opus. I guess it could have to do with the locale...

I did also try the Tahoma font, and everything seems to look fine with it, yeah (and it's not that big of a difference between the Microsoft Sans Serif font, so I guess it wouldn't be the end of the world if I had to use that instead). Microsoft Sans Serif (8-9px) seems to be one of supposedly few fonts with this problem, and I guess Tahoma, Segoe UI and Arial isn't one of them.

Anyway, thanks for the information. It seems it's really ClearType that screws it up. Unfortunately, I've become really used to ClearType (some text are also hard for me to see sometimes when it's at the top of the screen because they get kind of blurred... at least on my monitor), so I guess I'll have to settle with another font.

Maybe your Opus config was imported from a previous machine/OS where Microsoft Sans Serif was the default. I can't remember what the defaults were back on Win2k/Win9x. The default may also vary with OS font settings, of course.

Anyway, don't worry, the icon clipping will be fixed in the next update, so you can continue using whichever font you like the most.

It's actually a fresh installation I made quite recently.

You know, I actually checked the entire list of fonts available on my system, and I couldn't find a single one where characters A-Z wouldn't clip (and that also had some extra Unicode characters mapped that I need for some file names)... so thank you for fixing this!