![]() |
VOOZH | about |
Given a word or name, the task is to print it in a custom-designed font using Python. Each character of the input is mapped to a pattern made of symbols, allowing you to print text in your own creative style. For example:
Input: ROOT
Output:
..######..
..#....#..
..#.##...
..#...#...
..#....#..
..######..
..#....#..
..#....#..
..#....#..
..######..Explanation: Each character of "ROOT" is matched with its ASCII-art pattern and printed line by line.
Now, let’s explore different methods to print custom fonts using Python.
This method stores every character’s ASCII-art as a list of rows, enabling clean horizontal alignment. It prints the custom font by assembling the output row by row, which looks neat and scales well.
Output:
..######.. ..######.. ..######.. ..#...#...
..#....... ..#....... ..#....... ..#..#....
..#.####.. ..#####... ..#####... ..##......
..#....#.. ..#....... ..#....... ..#..#....
..#####... ..######.. ..######.. ..#...#...
Explanation:
This method stores each character as a full block string. It prints each block as soon as the character appears.
Output:
..######..
..#.......
..#.####..
..#....#..
..#####...
..######..
..#.......
..#####...
..#.......
..######..
..######..
..#.......
..#####...
..#.......
..######..
..#...#...
..#..#....
..##......
..#..#....
..#...#...
Explanation:
This method defines a function that prints the pattern for each character by using if / elif checks.
Output:
..######..
..#.......
..#.####..
..#....#..
..#####...
..######..
..#.......
..#####...
..#.......
..######..
..######..
..#.......
..#####...
..#.......
..######..
..#...#...
..#..#....
..##......
..#..#....
..#...#...
Explanation:
This traditional method manually checks each character and prints its pattern. It is clear but repetitive.
Output:
..######..
..#.......
..#.####..
..#....#..
..#####...
..######..
..#.......
..#####...
..#.......
..######..
..######..
..#.......
..#####...
..#.......
..######..
..#...#...
..#..#....
..##......
..#..#....
..#...#...
Explanation: