Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

Draw String With Custom Charset And Custom Fonts.

Open nifanfa opened this issue 3 years ago • 14 comments

QQ截图20210621202723


QQ截图20210621195934

It support Anti-Aliasing(not real) and it's fast. Don't worry about the performance!


QQ截图20210621194656 👉Generator Here 👉Source


Actually I want add the generator here but i don't know how to modify it...

QQ截图20210621195205


QQ截图20210621195802

nifanfa avatar Jun 21 '21 12:06 nifanfa

QQ截图20210621202723

nifanfa avatar Jun 21 '21 12:06 nifanfa

By the way. i think this problem must be solved #1844

nifanfa avatar Jun 21 '21 12:06 nifanfa

How do you use it?

ghost avatar Jun 24 '21 00:06 ghost

How do you use it?

image

nifanfa avatar Jun 24 '21 03:06 nifanfa

Does it support the DoubleBufferedVMwareSVGAII driver / canvas?

elkaamee326 avatar Jun 24 '21 03:06 elkaamee326

Does it support the DoubleBufferedVMwareSVGAII driver / canvas?

it only support canvas. but if you want you can implement it!

nifanfa avatar Jun 24 '21 03:06 nifanfa

it just uses DrawPoint

nifanfa avatar Jun 24 '21 03:06 nifanfa

Thanks for the PR. It would be very cool to have better font support in Cosmos. Just a few questions:

  • Is there any specification for the format of the BitFont? It would be very good if you could add some comment, so that other people know how to create a BitFont.
  • When implementing the other font support for Cosmos, I created the abstract class https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System2/Graphics/Fonts/Font.cs would it be possible to make BitFont implement it? Do you think the interface should be changed?
  • For the drawing methods, could they also be part of the Canvas class directly? That would keep the interface consistent. Even better would be if drawing strings using BitFont or PCScreenFont can be done using the same method.

quajak avatar Jul 14 '21 14:07 quajak

i think im noticing an issue with it actualy, the font looks "wobily" and uneven, you can see it in this image, you need to properly align the fonts, but from figure 2 it looks ok Screenshot 2021-07-16 151904 Screenshot 2021-07-16 151920 Screenshot 2021-07-16 151848

terminal-cs avatar Jul 16 '21 22:07 terminal-cs

nianfa, could you please respond to quajak plez? this is cool and should be implemented.

terminal-cs avatar Sep 18 '21 23:09 terminal-cs

nianfa, could you please respond to quajak plez? this is cool and should be implemented.

Yes. But in fact, there is no difference between bitfont in Mosa and Cosmos

nifanfa avatar Oct 01 '21 08:10 nifanfa

i think im noticing an issue with it actualy, the font looks "wobily" and uneven, you can see it in this image, you need to properly align the fonts, but from figure 2 it looks ok Screenshot 2021-07-16 151904 Screenshot 2021-07-16 151920 Screenshot 2021-07-16 151848

You can simply modify the generator

nifanfa avatar Oct 01 '21 08:10 nifanfa

Cool, finaly reopened, but I think this needs to be refined a bit

terminal-cs avatar Oct 01 '21 08:10 terminal-cs

How do I use it? It’s a bit confusing and will it support the command line?

Dell-Optiplex-390 avatar Jan 30 '22 18:01 Dell-Optiplex-390

Why did you delete the repo?

Neil-Ciciglycerin avatar Apr 21 '24 17:04 Neil-Ciciglycerin

Luckily I already had this merged!

Neil-Ciciglycerin avatar Apr 21 '24 17:04 Neil-Ciciglycerin