Skip to content

Commit

Permalink
Test bitmap fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed May 27, 2022
1 parent 80e19db commit c419923
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/draw/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,3 +743,31 @@ def test_tabulation_character(assert_pixels):
}
</style>
<pre>a&Tab;b</pre>''')


def test_otb_font(assert_pixels):
assert_pixels('''
____________________
__RR______RR________
__RR__RR__RR________
__RR__RR__RR________
____________________
____________________
''', '''
<style>
@page {
size: 20px 6px;
margin: 1px;
}
@font-face {
src: url(weasyprint.otb);
font-family: weasyprint-otb;
}
body {
color: red;
font-family: weasyprint-otb;
font-size: 4px;
line-height: 1;
}
</style>
AaA''')
Binary file added tests/resources/weasyprint.otb
Binary file not shown.

0 comments on commit c419923

Please sign in to comment.