-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement get/set_default() for PangoCairoFontMap + Documentation cla…
…rification (#26)
- Loading branch information
1 parent
82f5485
commit 8472dab
Showing
6 changed files
with
98 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from pangocairocffi import PangoCairoFontMap | ||
|
||
|
||
def test_font_map(): | ||
font_map_default = PangoCairoFontMap.get_default() | ||
font_map_new = PangoCairoFontMap() | ||
assert font_map_new != font_map_default | ||
|
||
resolution = font_map_new.get_resolution() | ||
assert resolution == 96 | ||
font_map_new.set_resolution(123) | ||
assert font_map_new.get_resolution() == 123 | ||
|
||
PangoCairoFontMap.set_default(font_map_new) | ||
assert font_map_new == PangoCairoFontMap.get_default() | ||
PangoCairoFontMap.set_default(None) |