Skip to content

halftone support #2623

@TiceRex

Description

@TiceRex

I can see there are some halftone fonts available, but I think halftone support could be extended to any font by using a simple algorithm.
Just before sending the pattern to the display, you should apply AND with 0x55 or 0xAA alternately:

if (halftone == 1) { p = p & (((d%2)+1)*0x55); };

where p is the pattern to be displayed, and d is the horizontal position of the pattern.

Small fonts (i.e. 8 bit height) fall apart using this method, but the bigger ones (16 or more bits height) display nicely.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions