Can you put font data directly in the program?

Hello,

I want to put font data directly in my program,
and not use a library call.

Is this possible, or how would you do this?

I only want to use the digits, 0 thru 9, and the decimal point.

thanks

an example would be great

Like from the serial monitor?

Tell us how you would want to this.

I mean putting the font data from the library into the program definition area,
similar to examples I've seen for displaying an image.

I'm pretty sure this can be done, because it's the same type of thing that's
being done with the images.

So, what I'm saying is take the font data from a font library, put it into
the definition area of the program itself.

Then when you execute a print("xyz") statement, the data comes from
the data in the definition area, INSTEAD of, an "included" library.

So there would only be one font available. And I only want the digit anyway.

I can clarify the question more, but I don't see how to make the question
more clear. Thanks.

The answer is "yes".

But how does that answer help you do what you want to do? Maybe if you gave more details, we could help more.

MorganS:
The answer is "yes".

But how does that answer help you do what you want to do? Maybe if you gave more details, we could help more.

I don't have any code. So, I don't have any details either.

I now know it is possible to do this.

Now I'd like to know how?

That is my question.

How would you get a print("xyz") command to use the font data as defined in the program?

How would you get a print("xyz") command to use the font data as defined in the program?

"print" to what?
Some form of matrix display, presumably?

Eventually, your display driver class will inherit from the Print class, and you will implement a "write" method. This will need to read data from the font and write it to the display

Yes, thank you.

I am trying to print to the teeny-tiny OLED's.

I'm making a temperature sensor and display.
And I only need the digits, the decimal point,
and maybe a degree F or C character.

And I wanted to put it into the code itself
for memory size and for the sake of simplicity.

If I come up with something that works,
maybe one of you will help me refine it, a bit.

Sure. For an OLED project I recently did I used:

const byte Logo[] PROGMEM =
{
    240,
    64,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
.
.
.

as part of a bitmap definition. Because it's in PROGMEM I used pgm_read_byte_near(...) to access the data.