def fix_os2_unicoderange(font):
    os2_bitmap = font_data.get_os2_unicoderange_bitmap(font)
    expected_bitmap = font_data.get_cmap_unicoderange_bitmap(font)
    if os2_bitmap != expected_bitmap:
        font_data.set_os2_unicoderange_bitmap(font, expected_bitmap)
        bitmap_string = font_data.unicoderange_bitmap_to_string(expected_bitmap)
        print ('Set unicoderanges: ' + bitmap_string)
        return True
    return False
Exemple #2
0
def fix_os2_unicoderange(font):
    os2_bitmap = font_data.get_os2_unicoderange_bitmap(font)
    expected_bitmap = font_data.get_cmap_unicoderange_bitmap(font)
    if os2_bitmap != expected_bitmap:
        font_data.set_os2_unicoderange_bitmap(font, expected_bitmap)
        bitmap_string = font_data.unicoderange_bitmap_to_string(
            expected_bitmap)
        print('Set unicoderanges: ' + bitmap_string)
        return True
    return False
def fix_os2_unicoderange(font):
    os2_bitmap = font_data.get_os2_unicoderange_bitmap(font)
    expected_bitmap = font_data.get_cmap_unicoderange_bitmap(font)
    if os2_bitmap != expected_bitmap:
        old_bitmap_string = font_data.unicoderange_bitmap_to_string(os2_bitmap)
        font_data.set_os2_unicoderange_bitmap(font, expected_bitmap)
        bitmap_string = font_data.unicoderange_bitmap_to_string(expected_bitmap)
        print 'Change unicoderanges from:\n  %s\nto:\n  %s' % (
            old_bitmap_string, bitmap_string)
        return True
    return False
Exemple #4
0
def fix_os2_unicoderange(font):
    os2_bitmap = font_data.get_os2_unicoderange_bitmap(font)
    expected_bitmap = font_data.get_cmap_unicoderange_bitmap(font)
    if os2_bitmap != expected_bitmap:
        old_bitmap_string = font_data.unicoderange_bitmap_to_string(os2_bitmap)
        font_data.set_os2_unicoderange_bitmap(font, expected_bitmap)
        bitmap_string = font_data.unicoderange_bitmap_to_string(
            expected_bitmap)
        print 'Change unicoderanges from:\n  %s\nto:\n  %s' % (
            old_bitmap_string, bitmap_string)
        return True
    return False