How forgiving are browsers when it comes to family names and internal data? Let's test it out. In this demo I purposefully used a non-bold font in the bold syntax, and a non-italic font in the italic syntax, and I mix up the family names. Have a look:
$table_content = array(); $family_name = 'Test Family'; $syntax_css = 'family_name_test'; $demo_title = 'Mismatched Family Names'; $preamble = "In the demo below, you should see that in all browsers, you can link any fonts you wish into a single family. However, you should make sure that the style and weight match the syntax for IE8 and lower, and also make sure it degrades nicely if the web fonts do not load."; $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500")', 'font-weight' => 'normal', 'font-style' => 'normal', ), 'font_name' => 'Museo Slab 500', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'yes', 'bold' => 'no', 'italics' => 'no', ), 'tr_class' => 'family_name_test', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500-italic")', 'font-weight' => 'normal', 'font-style' => 'italic', ), 'font_name' => 'Museo Slab 500 Italic', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'yes', 'bold' => 'no', 'italics' => 'yes', ), 'tr_class' => 'family_name_test italic', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("steelfish-bold")', 'font-weight' => 'bold', 'font-style' => 'normal', ), 'font_name' => 'Steelfish Bold', 'flags' => array( 'family name' => 'Steelfish', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'no', ), 'tr_class' => 'family_name_test bold bigger', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("steelfish-bold-italic")', 'font-weight' => 'bold', 'font-style' => 'italic', ), 'font_name' => 'Steelfish Bold Italic', 'flags' => array( 'family name' => 'Steelfish', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'yes', ), 'tr_class' => 'family_name_test bold italic bigger', 'note' => '' ); ?> include('demo_table.php'); ?> $table_content = array(); $family_name = 'Test Family'; $syntax_css = 'family_name_and_flag_test'; $demo_title = 'Mismatched Family Names And Mismatched Flags'; $preamble = "In this demo we jumbled everything up. You shouldn't do this because it won't degrade properly no matter what you do. I only did it to demonstrate the forgivingness of browsers. Click the link at the top of the page to break the webfonts to see what I mean. The fonts that are bold will be replaced with regular fonts and vica versa. "; $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("steelfish-bold-italic")', 'font-weight' => 'normal', 'font-style' => 'normal', ), 'font_name' => 'Steelfish Bold Italic', 'flags' => array( 'family name' => 'Steelfish', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'yes', ), 'tr_class' => 'family_name_and_flag_test bigger', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("steelfish-bold")', 'font-weight' => 'normal', 'font-style' => 'italic', ), 'font_name' => 'Steelfish Bold', 'flags' => array( 'family name' => 'Steelfish', 'regular' => 'yes', 'bold' => 'no', 'italics' => 'yes', ), 'tr_class' => 'family_name_and_flag_test italic bigger', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500-italic")', 'font-weight' => 'bold', 'font-style' => 'normal', ), 'font_name' => 'Museo Slab 500 Italic', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'no', ), 'tr_class' => 'family_name_and_flag_test bold', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500")', 'font-weight' => 'bold', 'font-style' => 'italic', ), 'font_name' => 'Museo Slab 500', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'yes', ), 'tr_class' => 'family_name_and_flag_test bold italic', 'note' => '' ); ?> include('demo_table.php'); ?> $table_content = array(); $family_name = 'Test Family'; $syntax_css = 'mismatched_flags'; $demo_title = 'Mismatched Flags'; $preamble = "In this demo we jumbled up the styles. This will break in IE8 and lower. Actually, IE8 and lower browsers may peak inside the fonts and pick the correct fonts for you."; $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-700-italic")', 'font-weight' => 'normal', 'font-style' => 'normal', ), 'font_name' => 'Museo Slab 700 Italic', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'yes', ), 'tr_class' => 'mismatched_flag_test ', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'normal', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-700")', 'font-weight' => 'normal', 'font-style' => 'italic', ), 'font_name' => 'Museo Slab 700', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'yes', 'bold' => 'no', 'italics' => 'yes', ), 'tr_class' => 'mismatched_flag_test italic ', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'normal', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500-italic")', 'font-weight' => 'bold', 'font-style' => 'normal', ), 'font_name' => 'Museo Slab 500 Italic', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'no', ), 'tr_class' => 'mismatched_flag_test bold', 'note' => '' ); $table_content[] = array( 'code' => array( 'font-family' => '"'. $family_name . '", ' . $default_font , 'font-weight' => 'bold', 'font-style' => 'italic', ), 'syntax' => array( 'font-family' => '"'. $family_name . '"', ' src' => 'url("museo-slab-500")', 'font-weight' => 'bold', 'font-style' => 'italic', ), 'font_name' => 'Museo Slab 500', 'flags' => array( 'family name' => 'Museo Slab', 'regular' => 'no', 'bold' => 'yes', 'italics' => 'yes', ), 'tr_class' => 'mismatched_flag_test bold italic', 'note' => '' ); ?> include('demo_table.php'); ?>