-
Notifications
You must be signed in to change notification settings - Fork 7.6k
font size of 14px causes font descenders to be clipped #440
Comments
@tvoliter you might try increasing the line spacing by one pixel as well / instead. See this line: https://github.com/adobe/brackets/blob/master/src/styles/brackets_theme_default.less#L72 J. |
@joelrbrandt: it's not a line-height/clipping issue. The font itself renders wrong. (I.e. at the same line-height but a bigger font, the descenders aren't cut off; and at the same size but a bigger line-height, the descenders still are cut off). If we can change both Mac & Win to 13px I think that's the best thing to do. Since it's a fixed-pitch font, there seem to be certain size increments where the glyph width & height remain unchanged, but rendering within that box shifts slightly. Decreasing from 14px->13px -- on Win, anyway -- seems to be one of those cases where little is affected other than fixing this bug. If little changes on Mac too, that seems like the best fix. If there's a more evident size change on Mac going to 13px, we could make the LESS OS-conditional somehow. Another option is to add Consolas to the font-family chain, which will be present on most Windows machines and does not have this rendering issue. And since font fallback is automatic, we wouldn't have to deal with OS-conditional LESS code. |
@peterflynn @tvoliter Want to see if pull #443 works well in windows? |
@joelrbrandt: I think it looks pretty good -- a little less anti-aliased, and a little less rounded stylistically (closer to the classic Courier look, IMHO), but it definitely seems reasonable. One interesting thing is that on Mac, Ubuntu Mono looks heavier than Inconsolata, while on Win it doesn't look any heavier. Ultimately, I still think the nicest-looking font I've tried on Windows is Consolas, though. |
@peterflynn please take a look at pull #457 |
Fix issue #440 (text clipping on Win); allow for platform-specific font sizes
FBNC to @tvoliter |
The brackets editor font was recently changed from 15px to 14px. On Windows that causes certain characters (mostly characters with descenders like g, p, and curly braces) to be clipped.
Peter and I tested on 13px on Windows and the problem went away and the font appeared to be the same size as the 14px. We either need to conditionally set the font size on Windows to 13px with this font or change Mac and Win back to 15px.
The text was updated successfully, but these errors were encountered: