diff --git a/tests/fixtures/fonts/DejaVuSansMono.LICENSE b/tests/fixtures/fonts/DejaVuSansMono.LICENSE new file mode 100644 index 00000000..b3d93a12 --- /dev/null +++ b/tests/fixtures/fonts/DejaVuSansMono.LICENSE @@ -0,0 +1,78 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: DejaVu fonts +Upstream-Author: Stepan Roh (original author), + see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list +Source: https://dejavu-fonts.github.io/ + +Files: * +Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. + Bitstream Vera is a trademark of Bitstream, Inc. + DejaVu changes are in public domain. +License: bitstream-vera + Permission is hereby granted, free of charge, to any person obtaining a copy + of the fonts accompanying this license ("Fonts") and associated + documentation files (the "Font Software"), to reproduce and distribute the + Font Software, including without limitation the rights to use, copy, merge, + publish, distribute, and/or sell copies of the Font Software, and to permit + persons to whom the Font Software is furnished to do so, subject to the + following conditions: + . + The above copyright and trademark notices and this permission notice shall + be included in all copies of one or more of the Font Software typefaces. + . + The Font Software may be modified, altered, or added to, and in particular + the designs of glyphs or characters in the Fonts may be modified and + additional glyphs or characters may be added to the Fonts, only if the fonts + are renamed to names not containing either the words "Bitstream" or the word + "Vera". + . + This License becomes null and void to the extent applicable to Fonts or Font + Software that has been modified and is distributed under the "Bitstream + Vera" names. + . + The Font Software may be sold as part of a larger software package but no + copy of one or more of the Font Software typefaces may be sold by itself. + . + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, + TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME + FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING + ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE + FONT SOFTWARE. + . + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising or + otherwise to promote the sale, use or other dealings in this Font Software + without prior written authorization from the Gnome Foundation or Bitstream + Inc., respectively. For further information, contact: fonts at gnome dot + org. + +Files: debian/* +Copyright: (C) 2005-2006 Peter Cernak + (C) 2006-2011 Davide Viti + (C) 2011-2013 Christian Perrier + (C) 2013 Fabian Greffrath +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + /usr/share/common-licenses/GPL-2'. diff --git a/tests/fixtures/fonts/DejaVuSansMono.ttf b/tests/fixtures/fonts/DejaVuSansMono.ttf new file mode 100644 index 00000000..538ee272 Binary files /dev/null and b/tests/fixtures/fonts/DejaVuSansMono.ttf differ diff --git a/tests/integration/test_block_layout.c b/tests/integration/test_block_layout.c index 45b73344..3d845d1b 100644 --- a/tests/integration/test_block_layout.c +++ b/tests/integration/test_block_layout.c @@ -816,6 +816,8 @@ static void test_block_layout_320(void) void test_block_layout(void) { lcui_init(); + pd_font_try_load_file("fonts/DejaVuSansMono.ttf"); + pd_font_family_set_alias("monospace", "DejaVu Sans Mono"); block_layout_scene_build(); ctest_describe("root width 1280px", test_block_layout_1280); diff --git a/tests/integration/test_flex_layout.c b/tests/integration/test_flex_layout.c index 76677b6e..d2cea0d8 100644 --- a/tests/integration/test_flex_layout.c +++ b/tests/integration/test_flex_layout.c @@ -1779,6 +1779,8 @@ static void test_constraint_refreshes_after_parent_relayout(void) void test_flex_layout(void) { lcui_init(); + pd_font_try_load_file("fonts/DejaVuSansMono.ttf"); + pd_font_family_set_alias("monospace", "DejaVu Sans Mono"); ui_widget_set_title(ui_root(), L"test flex layout"); flex_layout_scene_build(); diff --git a/tests/integration/test_flex_layout_percentage_wrap.c b/tests/integration/test_flex_layout_percentage_wrap.c index e628265a..accbd056 100644 --- a/tests/integration/test_flex_layout_percentage_wrap.c +++ b/tests/integration/test_flex_layout_percentage_wrap.c @@ -333,6 +333,8 @@ static void test_fixed_wrap_content_contributions(void) void test_flex_layout_percentage_wrap(void) { lcui_init(); + pd_font_try_load_file("fonts/DejaVuSansMono.ttf"); + pd_font_family_set_alias("monospace", "DejaVu Sans Mono"); ui_widget_set_title(ui_root(), L"test flex layout percentage wrap"); load_scene();