Esempio n. 1
0
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test general health of the fonts."""

import unittest

from robofab.world import OpenFont
from nototools.unittests import font_tests

import roboto_data

FONTS = font_tests.load_fonts(
    ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
    expected_count=20)

UFO_MASTERS = font_tests.load_fonts(
    ['src/v2/*.ufo'],
    expected_count=3,
    font_class=OpenFont)


class TestItalicAngle(font_tests.TestItalicAngle):
    loaded_fonts = FONTS
    expected_italic_angle = -12.0


class TestMetaInfo(font_tests.TestMetaInfo):
    """Bugs:
Esempio n. 2
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test assumptions that web fonts rely on."""

import unittest
from nototools.unittests import font_tests

import run_general_tests


FONTS = font_tests.load_fonts(
    ['out/web/*.ttf'],
    expected_count=18)


class TestItalicAngle(run_general_tests.TestItalicAngle):
    loaded_fonts = FONTS


class TestMetaInfo(font_tests.TestMetaInfo):
    loaded_fonts = FONTS
    mark_heavier_as_bold = False

    # Since different font files are hinted at different times, the actual
    # outlines differ slightly. So we are keeping the version numbers as a hint.
    test_version_numbers = None
Esempio n. 3
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test assumptions that Android relies on."""

import unittest
from nototools.unittests import font_tests

import run_general_tests


FONTS = font_tests.load_fonts(
    ['out/android/*.ttf'],
    expected_count=18)


class TestMetaInfo(run_general_tests.TestMetaInfo):
    """Bugs:
    https://github.com/google/roboto/issues/142
    """

    loaded_fonts = FONTS
    mark_heavier_as_bold = True


class TestNames(run_general_tests.TestNames):
    """Bugs:
    https://github.com/google/roboto/issues/37
Esempio n. 4
0
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Test assumptions that web fonts rely on."""

import unittest
from nototools.unittests import font_tests

import run_general_tests

FONTS = font_tests.load_fonts(['out/web/*.ttf'], expected_count=18)


class TestItalicAngle(run_general_tests.TestItalicAngle):
    loaded_fonts = FONTS


class TestMetaInfo(font_tests.TestMetaInfo):
    loaded_fonts = FONTS
    mark_heavier_as_bold = True

    # Since different font files are hinted at different times, the actual
    # outlines differ slightly. So we are keeping the version numbers as a hint.
    test_version_numbers = None

    # fsType of 0 marks the font free for installation, embedding, etc.
Esempio n. 5
0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Time-consuming tests for general health of the fonts."""

import unittest
from nototools.unittests import font_tests

FONTS = font_tests.load_fonts(
    ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'], expected_count=18)


class TestSpacingMarks(font_tests.TestSpacingMarks):
    loaded_fonts = FONTS


class TestSoftDottedChars(font_tests.TestSoftDottedChars):
    loaded_fonts = FONTS
    # FIXME: Test is currently disabled, since the fonts fail it
    test_combinations = None


if __name__ == '__main__':
    unittest.main()
Esempio n. 6
0
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test general health of the fonts."""

import unittest

from robofab.world import OpenFont
from nototools.unittests import font_tests

import roboto_data

FONTS = font_tests.load_fonts(
    ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
    expected_count=18)

UFOS = font_tests.load_fonts(
    ['out/RobotoUFO/*.ufo', 'out/RobotoCondensedUFO/*.ufo'],
    expected_count=18,
    font_class=OpenFont)

UFO_MASTERS = font_tests.load_fonts(
    ['src/v2/*.ufo'],
    expected_count=3,
    font_class=OpenFont)

class TestItalicAngle(font_tests.TestItalicAngle):
    loaded_fonts = FONTS
    expected_italic_angle = -12.0
Esempio n. 7
0
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Time-consuming tests for general health of the fonts."""

import unittest
from nototools.unittests import font_tests

FONTS = font_tests.load_fonts(
    ['out/RobotoTTF/*.ttf', 'out/RobotoCondensedTTF/*.ttf'],
    expected_count=20)


class TestSpacingMarks(font_tests.TestSpacingMarks):
    loaded_fonts = FONTS


class TestSoftDottedChars(font_tests.TestSoftDottedChars):
    loaded_fonts = FONTS
    # FIXME: Test is currently disabled, since the fonts fail it
    test_combinations = None


if __name__ == '__main__':
    unittest.main()
Esempio n. 8
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test assumptions that Android relies on."""

import unittest
from nototools.unittests import font_tests

import run_general_tests


FONTS = font_tests.load_fonts(
    ['out/android/*.ttf'],
    expected_count=18)


class TestMetaInfo(run_general_tests.TestMetaInfo):
    """Bugs:
    https://github.com/google/roboto/issues/142
    """

    loaded_fonts = FONTS
    mark_heavier_as_bold = True


class TestNames(run_general_tests.TestNames):
    """Bugs:
    https://github.com/google/roboto/issues/37
Esempio n. 9
0
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Test general health of the fonts."""

import unittest

from robofab.world import OpenFont
from nototools.unittests import font_tests

import roboto_data

FONTS = font_tests.load_fonts(
    ['hinted/*.ttf'],
    expected_count=18)

UFOS = font_tests.load_fonts(
    ['out/RobotoUFO/*.ufo', 'out/RobotoCondensedUFO/*.ufo'],
    expected_count=18,
    font_class=OpenFont)

UFO_MASTERS = font_tests.load_fonts(
    ['src/v2/*.ufo'],
    expected_count=3,
    font_class=OpenFont)

class TestItalicAngle(font_tests.TestItalicAngle):
    loaded_fonts = FONTS
    expected_italic_angle = -12.0