jicpl-iscteiul / blacken

Automatically exported from code.google.com/p/blacken
0 stars 0 forks source link

By default, line-drawing characters are unusable #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try to use line-drawing characters
2. notice that they don't fit the available space

What is the expected output? What do you see instead?

The expected output is usable line-drawing characters. While the cell walls 
provide an alternative to line-drawing characters, they will remain very 
popular.

The problem stems from the use of the Java default MONOSPACE font. The source 
of the glyphs used for the ASCII letters is different than the source used by 
the line-drawing characters. (MONOSPACE is a composite font, so different 
glyphs come from different source fonts.)

The solution is to default to a single font -- which will give a better result 
for all glyphs -- instead of defaulting to the composite MONOSPACE font.

Original issue reported on code.google.com by yam...@gmail.com on 8 Aug 2012 at 8:14

GoogleCodeExporter commented 8 years ago
Issue 28 has been merged into this issue.

Original comment by terra1...@aol.com on 8 Aug 2012 at 10:06

GoogleCodeExporter commented 8 years ago
So I checked in a fix for this... I'm not 100% happy with it.

Line-drawing characters work. There are no issues with characters being too 
wide that I saw... They're also exactly the correct height.

But the SHADE characters (25%/50%/75%) seem short. Like they have empty space 
above them. At this point I want to double-check the font itself, it's possible 
it's an issue with short glyphs in the font.

Oh, fonts can now be pulled in from the resources folder. By default it picks a 
font by name, so I'm using a prefix of "resource:" as an indicator to pull the 
font via getClass().getResourceAsStream(String). (I thought that "resource:" 
was a reasonable prefix that wouldn't end up biting us in the ass if we later 
wanted generalized URI support.)

Original comment by yam...@gmail.com on 18 Aug 2012 at 3:16