diff --git a/Lib/fontbakery/fonts_public.proto b/Lib/fontbakery/fonts_public.proto index 199a8eeddf..a9b0eaa5f0 100644 --- a/Lib/fontbakery/fonts_public.proto +++ b/Lib/fontbakery/fonts_public.proto @@ -12,6 +12,18 @@ message FamilyProto { required string name = 1; required string designer = 2; required string license = 3; + + // A mutually-exclusive category for each font. The categories are: Serif, + // Sans Serif, Display, Handwriting and Monospace. Being mutually exclusive is + // a significant deficiency as, for example, most Display fonts are typically + // Serif or Sans Serif and that is not captured. + // + // For searching, this field is replaced by stroke and classifications (see + // below), however, this field persists (it's required after all) and will + // continue to be populated in the onboarding process. + // + // This is repeated field, yet Google Fonts only uses the last entry so + // multiple entries should be avoided. repeated string category = 4; // Only the LAST value is used by Google Fonts required string date_added = 5; repeated FontProto fonts = 6; @@ -33,7 +45,23 @@ message FamilyProto { // The script to use when picking sample text. See the Script spanner table. optional string primary_script = 21; - // Next = 22 + // Stroke of the letter forms: serif, sans serif, or slab serif. A family + // has a single stroke and may have none at all. The values are strings that + // in all uppercase with spaces replaced by underscores: + // SERIF + // SANS_SERIF + // SLAB_SERIF + optional string stroke = 22; + + // A family's broad classifications: display, handwriting, monospace, and + // symbols (not text). The values are in all uppercase: + // DISPLAY + // HANDWRITING + // MONOTYPE + // SYMBOLS + repeated string classifications = 23; + + // Next = 24 } message FontProto { diff --git a/Lib/fontbakery/fonts_public_pb2.py b/Lib/fontbakery/fonts_public_pb2.py index e339926815..666dd44bb7 100644 --- a/Lib/fontbakery/fonts_public_pb2.py +++ b/Lib/fontbakery/fonts_public_pb2.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: fonts_public.proto - +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message @@ -20,7 +20,7 @@ syntax='proto2', serialized_options=b'\n\026com.google.fonts.protoB\013FontsPublic', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x12\x66onts_public.proto\x12\x13google.fonts_public\"\x81\x07\n\x0b\x46\x61milyProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x10\n\x08\x64\x65signer\x18\x02 \x02(\t\x12\x0f\n\x07license\x18\x03 \x02(\t\x12\x10\n\x08\x63\x61tegory\x18\x04 \x03(\t\x12\x12\n\ndate_added\x18\x05 \x02(\t\x12-\n\x05\x66onts\x18\x06 \x03(\x0b\x32\x1e.google.fonts_public.FontProto\x12\x0f\n\x07\x61liases\x18\x07 \x03(\t\x12\x0f\n\x07subsets\x18\x08 \x03(\t\x12\x19\n\x11ttf_autohint_args\x18\t \x01(\t\x12\x33\n\x04\x61xes\x18\n \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x62\n\x1aregistry_default_overrides\x18\x0b \x03(\x0b\x32>.google.fonts_public.FamilyProto.RegistryDefaultOverridesEntry\x12\x30\n\x06source\x18\x0c \x01(\x0b\x32 .google.fonts_public.SourceProto\x12\x0f\n\x07is_noto\x18\r \x01(\x08\x12\x11\n\tlanguages\x18\x0e \x03(\t\x12;\n\tfallbacks\x18\x0f \x03(\x0b\x32(.google.fonts_public.FamilyFallbackProto\x12I\n\rsample_glyphs\x18\x10 \x03(\x0b\x32\x32.google.fonts_public.FamilyProto.SampleGlyphsEntry\x12\x39\n\x0bsample_text\x18\x11 \x01(\x0b\x32$.google.fonts_public.SampleTextProto\x12\x14\n\x0c\x64isplay_name\x18\x12 \x01(\t\x12\x43\n\x15ordered_sample_glyphs\x18\x13 \x03(\x0b\x32$.google.fonts_public.GlyphGroupProto\x12\x14\n\x0cminisite_url\x18\x14 \x01(\t\x12\x16\n\x0eprimary_script\x18\x15 \x01(\t\x1a?\n\x1dRegistryDefaultOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x33\n\x11SampleGlyphsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x01\n\tFontProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\r\n\x05style\x18\x02 \x02(\t\x12\x0e\n\x06weight\x18\x03 \x02(\x05\x12\x10\n\x08\x66ilename\x18\x04 \x02(\t\x12\x18\n\x10post_script_name\x18\x05 \x02(\t\x12\x11\n\tfull_name\x18\x06 \x02(\t\x12\x11\n\tcopyright\x18\x07 \x01(\t\"Z\n\x10\x41xisSegmentProto\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x11\n\tmin_value\x18\x02 \x01(\x02\x12\x11\n\tmax_value\x18\x04 \x01(\x02J\x04\x08\x03\x10\x04R\rdefault_value\"\x8f\x01\n\x0bSourceProto\x12\x16\n\x0erepository_url\x18\x01 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x05 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x13\n\x0b\x61rchive_url\x18\x03 \x01(\t\x12\x33\n\x05\x66iles\x18\x04 \x03(\x0b\x32$.google.fonts_public.SourceFileProto\"9\n\x0fSourceFileProto\x12\x13\n\x0bsource_file\x18\x01 \x01(\t\x12\x11\n\tdest_file\x18\x02 \x01(\t\"H\n\x0bTargetProto\x12\x39\n\x0btarget_type\x18\x01 \x01(\x0e\x32$.google.fonts_public.TargetTypeProto\"\xcc\x01\n\x13\x46\x61milyFallbackProto\x12:\n\x0b\x61xis_target\x18\x01 \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x30\n\x06target\x18\x02 \x03(\x0b\x32 .google.fonts_public.TargetProto\x12\x17\n\x0fsize_adjust_pct\x18\x03 \x01(\x02\x12\x1b\n\x13\x61scent_override_pct\x18\x05 \x01(\x02\x12\x11\n\tlocal_src\x18\x04 \x03(\t\"\x84\x02\n\x0fSampleTextProto\x12\x15\n\rmasthead_full\x18\x01 \x01(\t\x12\x18\n\x10masthead_partial\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x0e\n\x06tester\x18\x04 \x01(\t\x12\x11\n\tposter_sm\x18\x05 \x01(\t\x12\x11\n\tposter_md\x18\x06 \x01(\t\x12\x11\n\tposter_lg\x18\x07 \x01(\t\x12\x13\n\x0bspecimen_48\x18\x08 \x01(\t\x12\x13\n\x0bspecimen_36\x18\t \x01(\t\x12\x13\n\x0bspecimen_32\x18\n \x01(\t\x12\x13\n\x0bspecimen_21\x18\x0b \x01(\t\x12\x13\n\x0bspecimen_16\x18\x0c \x01(\t\"/\n\x0fGlyphGroupProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06glyphs\x18\x02 \x01(\t*\x92\x01\n\x0fTargetTypeProto\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x15\n\x11TARGET_OS_WINDOWS\x10\x01\x12\x11\n\rTARGET_OS_MAC\x10\x02\x12\x13\n\x0fTARGET_OS_LINUX\x10\x03\x12\x15\n\x11TARGET_OS_ANDROID\x10\x04\x12\x11\n\rTARGET_OS_IOS\x10\x05\x42%\n\x16\x63om.google.fonts.protoB\x0b\x46ontsPublic' + serialized_pb=b'\n\x12\x66onts_public.proto\x12\x13google.fonts_public\"\xaa\x07\n\x0b\x46\x61milyProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\x10\n\x08\x64\x65signer\x18\x02 \x02(\t\x12\x0f\n\x07license\x18\x03 \x02(\t\x12\x10\n\x08\x63\x61tegory\x18\x04 \x03(\t\x12\x12\n\ndate_added\x18\x05 \x02(\t\x12-\n\x05\x66onts\x18\x06 \x03(\x0b\x32\x1e.google.fonts_public.FontProto\x12\x0f\n\x07\x61liases\x18\x07 \x03(\t\x12\x0f\n\x07subsets\x18\x08 \x03(\t\x12\x19\n\x11ttf_autohint_args\x18\t \x01(\t\x12\x33\n\x04\x61xes\x18\n \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x62\n\x1aregistry_default_overrides\x18\x0b \x03(\x0b\x32>.google.fonts_public.FamilyProto.RegistryDefaultOverridesEntry\x12\x30\n\x06source\x18\x0c \x01(\x0b\x32 .google.fonts_public.SourceProto\x12\x0f\n\x07is_noto\x18\r \x01(\x08\x12\x11\n\tlanguages\x18\x0e \x03(\t\x12;\n\tfallbacks\x18\x0f \x03(\x0b\x32(.google.fonts_public.FamilyFallbackProto\x12I\n\rsample_glyphs\x18\x10 \x03(\x0b\x32\x32.google.fonts_public.FamilyProto.SampleGlyphsEntry\x12\x39\n\x0bsample_text\x18\x11 \x01(\x0b\x32$.google.fonts_public.SampleTextProto\x12\x14\n\x0c\x64isplay_name\x18\x12 \x01(\t\x12\x43\n\x15ordered_sample_glyphs\x18\x13 \x03(\x0b\x32$.google.fonts_public.GlyphGroupProto\x12\x14\n\x0cminisite_url\x18\x14 \x01(\t\x12\x16\n\x0eprimary_script\x18\x15 \x01(\t\x12\x0e\n\x06stroke\x18\x16 \x01(\t\x12\x17\n\x0f\x63lassifications\x18\x17 \x03(\t\x1a?\n\x1dRegistryDefaultOverridesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x02:\x02\x38\x01\x1a\x33\n\x11SampleGlyphsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8a\x01\n\tFontProto\x12\x0c\n\x04name\x18\x01 \x02(\t\x12\r\n\x05style\x18\x02 \x02(\t\x12\x0e\n\x06weight\x18\x03 \x02(\x05\x12\x10\n\x08\x66ilename\x18\x04 \x02(\t\x12\x18\n\x10post_script_name\x18\x05 \x02(\t\x12\x11\n\tfull_name\x18\x06 \x02(\t\x12\x11\n\tcopyright\x18\x07 \x01(\t\"Z\n\x10\x41xisSegmentProto\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x11\n\tmin_value\x18\x02 \x01(\x02\x12\x11\n\tmax_value\x18\x04 \x01(\x02J\x04\x08\x03\x10\x04R\rdefault_value\"\x8f\x01\n\x0bSourceProto\x12\x16\n\x0erepository_url\x18\x01 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x05 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x13\n\x0b\x61rchive_url\x18\x03 \x01(\t\x12\x33\n\x05\x66iles\x18\x04 \x03(\x0b\x32$.google.fonts_public.SourceFileProto\"9\n\x0fSourceFileProto\x12\x13\n\x0bsource_file\x18\x01 \x01(\t\x12\x11\n\tdest_file\x18\x02 \x01(\t\"H\n\x0bTargetProto\x12\x39\n\x0btarget_type\x18\x01 \x01(\x0e\x32$.google.fonts_public.TargetTypeProto\"\xcc\x01\n\x13\x46\x61milyFallbackProto\x12:\n\x0b\x61xis_target\x18\x01 \x03(\x0b\x32%.google.fonts_public.AxisSegmentProto\x12\x30\n\x06target\x18\x02 \x03(\x0b\x32 .google.fonts_public.TargetProto\x12\x17\n\x0fsize_adjust_pct\x18\x03 \x01(\x02\x12\x1b\n\x13\x61scent_override_pct\x18\x05 \x01(\x02\x12\x11\n\tlocal_src\x18\x04 \x03(\t\"\x84\x02\n\x0fSampleTextProto\x12\x15\n\rmasthead_full\x18\x01 \x01(\t\x12\x18\n\x10masthead_partial\x18\x02 \x01(\t\x12\x0e\n\x06styles\x18\x03 \x01(\t\x12\x0e\n\x06tester\x18\x04 \x01(\t\x12\x11\n\tposter_sm\x18\x05 \x01(\t\x12\x11\n\tposter_md\x18\x06 \x01(\t\x12\x11\n\tposter_lg\x18\x07 \x01(\t\x12\x13\n\x0bspecimen_48\x18\x08 \x01(\t\x12\x13\n\x0bspecimen_36\x18\t \x01(\t\x12\x13\n\x0bspecimen_32\x18\n \x01(\t\x12\x13\n\x0bspecimen_21\x18\x0b \x01(\t\x12\x13\n\x0bspecimen_16\x18\x0c \x01(\t\"/\n\x0fGlyphGroupProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06glyphs\x18\x02 \x01(\t*\x92\x01\n\x0fTargetTypeProto\x12\x16\n\x12TARGET_UNSPECIFIED\x10\x00\x12\x15\n\x11TARGET_OS_WINDOWS\x10\x01\x12\x11\n\rTARGET_OS_MAC\x10\x02\x12\x13\n\x0fTARGET_OS_LINUX\x10\x03\x12\x15\n\x11TARGET_OS_ANDROID\x10\x04\x12\x11\n\rTARGET_OS_IOS\x10\x05\x42%\n\x16\x63om.google.fonts.protoB\x0b\x46ontsPublic' ) _TARGETTYPEPROTO = _descriptor.EnumDescriptor( @@ -63,8 +63,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1975, - serialized_end=2121, + serialized_start=2016, + serialized_end=2162, ) _sym_db.RegisterEnumDescriptor(_TARGETTYPEPROTO) @@ -112,8 +112,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=825, - serialized_end=888, + serialized_start=866, + serialized_end=929, ) _FAMILYPROTO_SAMPLEGLYPHSENTRY = _descriptor.Descriptor( @@ -150,8 +150,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=890, - serialized_end=941, + serialized_start=931, + serialized_end=982, ) _FAMILYPROTO = _descriptor.Descriptor( @@ -309,6 +309,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='stroke', full_name='google.fonts_public.FamilyProto.stroke', index=21, + number=22, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='classifications', full_name='google.fonts_public.FamilyProto.classifications', index=22, + number=23, type=9, cpp_type=9, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], @@ -322,7 +336,7 @@ oneofs=[ ], serialized_start=44, - serialized_end=941, + serialized_end=982, ) @@ -395,8 +409,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=944, - serialized_end=1082, + serialized_start=985, + serialized_end=1123, ) @@ -441,8 +455,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1084, - serialized_end=1174, + serialized_start=1125, + serialized_end=1215, ) @@ -501,8 +515,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1177, - serialized_end=1320, + serialized_start=1218, + serialized_end=1361, ) @@ -540,8 +554,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1322, - serialized_end=1379, + serialized_start=1363, + serialized_end=1420, ) @@ -572,8 +586,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1381, - serialized_end=1453, + serialized_start=1422, + serialized_end=1494, ) @@ -632,8 +646,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1456, - serialized_end=1660, + serialized_start=1497, + serialized_end=1701, ) @@ -741,8 +755,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1663, - serialized_end=1923, + serialized_start=1704, + serialized_end=1964, ) @@ -780,8 +794,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1925, - serialized_end=1972, + serialized_start=1966, + serialized_end=2013, ) _FAMILYPROTO_REGISTRYDEFAULTOVERRIDESENTRY.containing_type = _FAMILYPROTO