luma.oled icon indicating copy to clipboard operation
luma.oled copied to clipboard

Need assistance with Unicode to font table mappings for the ws0010 class

Open dhrone opened this issue 3 years ago • 1 comments

The new ws0010 (and related winstar_weh) classes contain embedded fonts. The data for these fonts are contained within luma.oled.device.const.py in a dict called FONTDATA. One key in FONTDATA is 'mappings' which is a list of four dicts (one for each of the four fonts that the ws0010 supports). Each dict contains a collection of key value pairs which provide unicode values for as many of the table values as I could decode. I'm looking for help to fill in the missing values and validate that I've correctly assigned the ones that are there. I'd also be interested in any look-alike values that should be added (e.g. unicode codepoints that look the same as a mapping that already exists. A good example of that would be the series of cyrillic mappings I've included for their english equivalents.

Here's a small example of what the tables looks like...

            {   # FT00 ENGLISH_JAPANESE CHARACTER FONT
                # Missing maps for
                # 10-1F, 80-9f, a0, a1, e7, e9, ea, f8, f9, fa, fc, fe
                0x0410:   0x41,  # А CYRILLIC CAPITAL LETTER A
                0x0412:   0x42,  # В CYRILLIC CAPITAL LETTER VE
                0x30f8:   0xa5,  # ヸ KATAKANA LETTER VI
                0x30f2:   0xa6,  # ヲ KATAKANA LETTER WO
                0x30a1:   0xa7,  # ァ KATAKANA LETTER SMALL A
                0x30a3:   0xa8,  # ィ KATAKANA LETTER SMALL I
                0x30a5:   0xa9,  # ゥ KATAKANA LETTER SMALL U
                0x30a7:   0xaa,  # ェ KATAKANA LETTER SMALL E
                0x30a9:   0xab,  # ォ KATAKANA LETTER SMALL O
                0x30e3:   0xac,  # ャ KATAKANA LETTER SMALL YA
                0x30e5:   0xad,  # ュ KATAKANA LETTER SMALL YU
                0x30e7:   0xae,  # ョ KATAKANA LETTER SMALL YO
                0x30c3:   0xaf,  # ッ KATAKANA LETTER SMALL TU
}

The font tables are in the [ws0010 IC specification document](https://picaxe.com/docs/oled.pdf) on pages 7-10.  

dhrone avatar Aug 28 '20 15:08 dhrone

maybe @GRA0007 can help out here, I don't have access to such a device atm.

thijstriemstra avatar Aug 28 '20 15:08 thijstriemstra