Bitfont

Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2025-06-02

Problem Statement

Part 1: Given some bitmap lookup table, print out some letters in bitmap format. Replace the 0s and 1s with . and * and print them out.

I.E # This is an example bitmap of the letter "J"

0 0 0 0 1 0

0 0 0 0 1 0

0 0 0 0 1 0

0 0 0 0 1 0

0 0 0 0 1 0

0 0 0 0 1 0

1 0 0 0 1 0

0 1 1 1 0 0

0 0 0 0 0 0

0 0 0 0 0 0

Part 2: Given 2 letters and a number k, apply k pixels of kerning between the 2 letters (https://en.wikipedia.org/wiki/Kerning)

Part 3:

Given two letters

Calculate maximum possible kerning (pixels) between them

Need to determine how close the letters can get without overlapping

Someone has encounter some other problems:

1. compression and decompression on the lookup table, print out the same letters

2. some additional manipulation on the lookup table, print out the same letters. This should reuse part of phase two code.

Solution

Comments