Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Vector Font library for Teensy 3.6

  1. #1

    Vector Font library for Teensy 3.6

    Attached is a vector based font library 'vFont' that I've been working on as part of another project, for a Teensy3.6. vFont features most things one would expect from a vector font library; such as configurable paths', brush types and size and string/glyph orientation. To keep performance up, vFont renders directly to a frame buffer, then written to display whenever (see demo).

    Here it is released separately as an easily expandable C API (C, none of this class rubbish here).

    Usage example, to draw the base green layer from the attached video:
    // set the initial state
    setFont(ctx, &gothiceng);
    setGlyphScale(ctx, 4.0f);
    setRenderFilter(ctx, RENDEROP_NONE);
    setBrush(ctx, BRUSH_DISK);
    setBrushStep(ctx, 5.0f);
    setBrushSize(ctx, 40.0f);
    setBrushColour(ctx, COLOUR_PAL_DARKGREEN);
    // now do the rendering
    drawString(ctx, "Gothic", x, y);

    Animated text:

    Click image for larger version. 

Name:	IMAG0197_1280.jpg 
Views:	273 
Size:	285.3 KB 
ID:	10856
    Click image for larger version. 

Name:	IMAG0224_1280.jpg 
Views:	243 
Size:	105.0 KB 
ID:	10855
    Last edited by MichaelMC; 06-30-2017 at 08:38 AM.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    That looks really awesome!

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Looks cool - What display are you using? I see in the code referencing something like usbd480.

    I like the demo!

  4. #4

    Kurte, The display name is USBD480 and is unconnected/separate from the font library. It's a Highspeed USB interfaced display, 16bpp with a resolution of 480x272 (from a PSP) with a touch panel on top, with an 8megabyte fully addressable framebuffer. Basically an MSP30 (if memory recalls) driving an FPGA with a 2046 touch controller wrapped round a composite USB interface. Source code for this is also included in the zip.
    Teensy36 has no problem driving this while also handling the full floating point vector [drawing] routines.

  5. #5
    Junior Member
    Join Date
    May 2022
    Paris, France
    Hi Michael

    This is an old post, I realise, but I just found it and decided to have a go at adapting your code for the Teensy 4.1 and my vstcm vector generator PCB which targets real vector monitors ( It works quite well! Here's a quick video (sorry for the awful quality, it looks great in reality):


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts