tdrucker424 / u8glib

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

Spaces don't maintain character width #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. u8g_drawStr(x,y,"12 34");
2. u8g_drawStr(x,y+dy,"56  7");

What is the expected output? What do you see instead?
I expect to see the 4 and 7 line up. Instead the 7 is 2 pixels off (to the 
left).

What version of the product are you using? On what operating system?
I'm on Windows 7, using arduino-0022, and v0.13 of u8glib.

Please provide any additional information below.

Original issue reported on code.google.com by bjt...@gmail.com on 28 Feb 2012 at 1:37

GoogleCodeExporter commented 8 years ago
I'm sorry. I completely forgot to mention which font I'm using. I'm using the 
orgdot fixed v01 (u8g_font_fixed_v0). 

Original comment by bjt...@gmail.com on 28 Feb 2012 at 4:10

GoogleCodeExporter commented 8 years ago
Ok. So I think this issue is possibly a relic of the font itself. I made/built 
the fixed_v0.bdf and checked the DWIDTH parameter of the space character. It 
turns out it isn't the same as the other characters. 

In any case, did you mean to mix the upper/lower nibbles for the data size and 
DWIDTH parameters? It was annoying trying to keep that in mind. Otherwise I 
think this isn't actually your problem.

Original comment by bjt...@gmail.com on 28 Feb 2012 at 5:18

GoogleCodeExporter commented 8 years ago
Thanks for the bug report.
I have investigated the fixed_v0. The font auther has indeed specified, that 
the space has a width of 4 pixel, while all other chars have 6 pixel width. So 
you will see an offest of 2 pixel. So from my perspective this is not a bug. 
You could use the monospaced fonts 6x10 or 6x12, which have a space of the same 
width as the other characters. 

Is it ok to close this issue?

Original comment by olikr...@gmail.com on 28 Feb 2012 at 5:28

GoogleCodeExporter commented 8 years ago
oh, was working in parallel on this issue :-)

Yes, it is a font issue. There is "DWIDTH 4 0" for space and "DWIDTH 6 0" for 
other chars. 

Original comment by olikr...@gmail.com on 28 Feb 2012 at 5:32

GoogleCodeExporter commented 8 years ago

Original comment by olikr...@gmail.com on 28 Feb 2012 at 5:32

GoogleCodeExporter commented 8 years ago
Yea! Go ahead a close it. Sorry to clutter up your issues here. Thanks for the 
response.

Original comment by bjt...@gmail.com on 28 Feb 2012 at 6:21

GoogleCodeExporter commented 8 years ago
So I wrote/modified a simple draw circle routine based on the midpoint cirlce 
algorithm ( http://en.wikipedia.org/wiki/Midpoint_circle_algorithm ). Do I need 
to be added as a contributor or can I commit changes myself?

Original comment by bjt...@gmail.com on 28 Feb 2012 at 7:06

Attachments:

GoogleCodeExporter commented 8 years ago
> Sorry to clutter up your issues here.
no problem, that is why we have a ticket system

i have added you as contributor, also note my e-mail

Thanks!

Oliver

Original comment by olikr...@gmail.com on 28 Feb 2012 at 7:52

GoogleCodeExporter commented 8 years ago
problem solved, not a bug

Original comment by olikr...@gmail.com on 1 Mar 2012 at 9:06