Page 1 of 2
Problems with personal font map
Posted: Mon Aug 24, 2009 2:45 pm
by Karlosoft
Hi! I'm working in 640x480 24bit graphic mode, and i need to add a character function. This is the font map (8x16) taken from an other source.
(It's the attached file)
Well when i compile the kernel the bin contains only the characters up to 26. Why the other 230 chars aren't "saved"?
Re: Problems with personal font map
Posted: Mon Aug 24, 2009 4:42 pm
by neon
...This makes me happy of using bitmap resources.
Im not to sure why it would only take the first 26 characters though. What happens if you add another label after the 26th character?
Re: Problems with personal font map
Posted: Mon Aug 24, 2009 4:51 pm
by Blue
After some playing around with the source, I found out that the error happens on this line (26th character):
Code: Select all
DB 000H ; 00000000 °°°°°°°° | |"→"| |
If you remove the arrow from the comment, it compiles to 4 KiB which fixes it.
On the other hand I have no idea of why it happens since the arrow actually is placed in a comment.
Re: Problems with personal font map
Posted: Mon Aug 24, 2009 4:53 pm
by neon
Hm, that is weird. Perhaps its an assembler bug?
Re: Problems with personal font map
Posted: Mon Aug 24, 2009 5:04 pm
by Blue
That is my thought too. It is an unicode character, so my wild guess would be that the assembler has problems handling unicode. The strange thing about that the character is placed in a comment
Re: Problems with personal font map
Posted: Mon Aug 24, 2009 10:33 pm
by ~
Yes, I think that NASM has problems with those characters. Maybe you should edit the file in real text mode, not using something like Notepad or avoid using those characters. Anyway, if the 1's and 0's of the bitmap are seen with attention and with a monospaced font like Courier, it should be easy to distinguish the character.
Re: Problems with personal font map
Posted: Tue Aug 25, 2009 3:13 am
by Karlosoft
In fact the 26th character wasn't shown all, but only up to the arrow. Now it work
Wow a bug in nasm... well thanks for the help
Re: Problems with personal font map
Posted: Tue Aug 25, 2009 3:53 am
by jal
Blue wrote:That is my thought too. It is an unicode character, so my wild guess would be that the assembler has problems handling unicode. The strange thing about that the character is placed in a comment :?
Err... guys... That is character 26, you know, ^Z? The "end of file" marker?
JAL
Re: Problems with personal font map
Posted: Tue Aug 25, 2009 4:16 am
by ~
It also has failed with this character ° that resembles degrees.
Re: Problems with personal font map
Posted: Tue Aug 25, 2009 4:40 am
by Blue
jal wrote:Err... guys... That is character 26, you know, ^Z? The "end of file" marker?
That makes sense today after sleeping
Thanks for clarifying
Re: Problems with personal font map
Posted: Sat Aug 29, 2009 5:33 am
by Karlosoft
This is my new font
Re: Problems with personal font map
Posted: Sat Aug 29, 2009 7:03 am
by Karlosoft
Why? what characters are difficult to read?
Re: Problems with personal font map
Posted: Sat Aug 29, 2009 7:12 am
by Karlosoft
Is this better?
Re: Problems with personal font map
Posted: Sat Aug 29, 2009 9:48 am
by Combuster
Adding to that, the L character is now identical to the 1 character
Re: Problems with personal font map
Posted: Sat Aug 29, 2009 10:17 am
by Firestryke31
A quick tip: Choose some brighter colors. The first pink part is good, but the purple font demo is too hard for me to see. I'd suggest something closer to #7010F0. Also, the dark pink number suffixes are a bit hard to read.
The X and Y characters are a bit top-heavy, as well as the P and R. Move the intersections down just a bit. You also might try a little more padding between characters (i.e. keep the cells the same width, but make the characters in the cells 1 pixel thinner). Finally, the entire lowercase f might need to be shifted one pixel up. I may also suggest adding one pixel to the height of most of the lowercase letters.
If we're talking about custom fonts, here's my own font I've developed over the past couple of years. This particular version is a 2 bit, 8pt, outlined version of my font, "Fawkes UI." It was manualy anti-aliased. It's supposed to be a proportionally-spaced font where the outline overlaps.
l
- Fawkes UI, 8pt, Outlined, 2 bit.
- FawkesUI-8pt-2bit.gif (968 Bytes) Viewed 5906 times
I originally designed it to caption a little GIF movie I was going to make (hence the useless musical note). It was created pixel-by-pixel in an editor called Usenti (which includes a very useful Export function that includes a C array or a GAS syntax ASM array which can be converted to NASM syntax with a couple of Finds/Replaces, as well as complete control of the palette). I have no idea how many people here know about it.