{"action":"created","issue":{"url":"https://api.github.com/repos/aristath/kirki/issues/992","repository_url":"https://api.github.com/repos/aristath/kirki","labels_url":"https://api.github.com/repos/aristath/kirki/issues/992/labels{/name}","comments_url":"https://api.github.com/repos/aristath/kirki/issues/992/comments","events_url":"https://api.github.com/repos/aristath/kirki/issues/992/events","html_url":"https://github.com/aristath/kirki/issues/992","id":156483324,"number":992,"title":"typography: Ability to load all/multiple variants of the font while keeping CSS output as it is","user":{"login":"rahulnever2far","id":3503359,"avatar_url":"https://avatars.githubusercontent.com/u/3503359?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulnever2far","html_url":"https://github.com/rahulnever2far","followers_url":"https://api.github.com/users/rahulnever2far/followers","following_url":"https://api.github.com/users/rahulnever2far/following{/other_user}","gists_url":"https://api.github.com/users/rahulnever2far/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulnever2far/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulnever2far/subscriptions","organizations_url":"https://api.github.com/users/rahulnever2far/orgs","repos_url":"https://api.github.com/users/rahulnever2far/repos","events_url":"https://api.github.com/users/rahulnever2far/events{/privacy}","received_events_url":"https://api.github.com/users/rahulnever2far/received_events","type":"User","site_admin":false},"labels":[{"id":98406560,"url":"https://api.github.com/repos/aristath/kirki/labels/feature","name":"feature","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-05-24T11:25:32Z","updated_at":"2016-12-12T18:50:21Z","closed_at":null,"body":"I have a `typography` field to select the base font of the theme. It is tried to the `body` tag. As it is base font, usual variants of the font (regular, italic, bold and bold italic) should be loaded because people use those variants in post content. However, CSS output should be as it is.\n\nI'm familiar with `Kirki_Fonts_Google::$force_load_all_variants = true;`. But I don't all variants of all typography fields to load because that would have a serious impact on theme's load time.\n\nI'm suggesting something like this:\n\n``` PHP\nKirki::add_field( 'my_config', array(\n  'settings' => 'my_typography',\n  'section'  => 'my_section',\n  'label'    => esc_html__( 'Typography', 'example' ),\n  'type'     => 'typography',\n  'default'  => array(\n    'font-family'    => 'Open Sans',\n    'variant'        => 'regular',\n    'subset'         => array( 'latin-ext' ),\n    'font-size'      => '14px',\n    'letter-spacing' => '0',\n    'text-transform' => 'uppercase',\n  ),\n  'choices'  => array(\n    'variant' => array( 'regular', 'italic', '700', '700italic' ),\n  ),\n  'output'   => array(\n    array(\n      'element'  => '.my-element',\n    ),\n  ),\n) );\n```\n"},"comment":{"url":"https://api.github.com/repos/aristath/kirki/issues/comments/266516693","html_url":"https://github.com/aristath/kirki/issues/992#issuecomment-266516693","issue_url":"https://api.github.com/repos/aristath/kirki/issues/992","id":266516693,"user":{"login":"carasmo","id":1124594,"avatar_url":"https://avatars.githubusercontent.com/u/1124594?v=3","gravatar_id":"","url":"https://api.github.com/users/carasmo","html_url":"https://github.com/carasmo","followers_url":"https://api.github.com/users/carasmo/followers","following_url":"https://api.github.com/users/carasmo/following{/other_user}","gists_url":"https://api.github.com/users/carasmo/gists{/gist_id}","starred_url":"https://api.github.com/users/carasmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carasmo/subscriptions","organizations_url":"https://api.github.com/users/carasmo/orgs","repos_url":"https://api.github.com/users/carasmo/repos","events_url":"https://api.github.com/users/carasmo/events{/privacy}","received_events_url":"https://api.github.com/users/carasmo/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T18:50:21Z","updated_at":"2016-12-12T18:50:21Z","body":"Ideally, and I apologize for repeating other requests, I'd love to see typography work like this:\r\n\r\nbody  font choose the variants/weights\r\nheadline font choose the variants weights\r\n\r\nWith a limited choice from the fonts I choose as some google fonts are crappy\r\n\r\nThen have the ability to add more Typography fields for the other areas like widget titles the site title with all the fonts available or just some funky ones I choose.  \r\n\r\nRight now, I have select field choosing just the fonts for the entire site,  but for the Site Title, if they don't have an image, I'm using a Typography field and sadly the google font used in the select is also added in the css output of the Typography field. It doesn't mess up design, but it looks bad in the code. "}}
{"actor":{"display_login":"carasmo"}}