I wrote a custom png class that uses libpng directly, as the others I used were cubbersome to deploy and would ring me through dependency hell. So to do way with that I just went straight to using libpng, which is very standard and less likely to cause issues. I have my own pixel matrix system, and have basic functionality such as plotting lines, dots, alpha channels, inserting pictures etc...
How would I go about implementing fonts and text? Basically, how do I read a font file and get the pixel matrix of a character at a certain size/format (italic etc) so that I can implement it in my class?
I want to do this without needing any libraries. Or at very least no 3rd party ones. Standard ones that will be the same on all systems like libpng I can deal with but if I can avoid it even better. Basically my code needs to work on any system without having to fight with libraries or complex g++ strings that could change between systems. This is a universal helper set of classes that I can drop in any program without having to deal with any dependency issues so coding it without use of libraries is important. On a app to app basis I'll use libraries if I need to, but I want to keep my base "library" clean of any dependencies.
I'm also thinking I might just make my own built in font for the class. If I want to do anything fancier in a specific program I can always use libs in that case. I just don't want to use libs for this base class.
How would I go about implementing fonts and text? Basically, how do I read a font file and get the pixel matrix of a character at a certain size/format (italic etc) so that I can implement it in my class?
I want to do this without needing any libraries. Or at very least no 3rd party ones. Standard ones that will be the same on all systems like libpng I can deal with but if I can avoid it even better. Basically my code needs to work on any system without having to fight with libraries or complex g++ strings that could change between systems. This is a universal helper set of classes that I can drop in any program without having to deal with any dependency issues so coding it without use of libraries is important. On a app to app basis I'll use libraries if I need to, but I want to keep my base "library" clean of any dependencies.
I'm also thinking I might just make my own built in font for the class. If I want to do anything fancier in a specific program I can always use libs in that case. I just don't want to use libs for this base class.