如何将Google网络字体动态加载到数组中? [关闭]
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何将Google网络字体动态加载到数组中? [关闭]相关的知识,希望对你有一定的参考价值。
我想提取整个Google Web字体集合的提要,并将它们收集到具有此结构的数组中(font collection => font name):
<?php
$googleFonts = array
(
"" => "None",
"Abel"=>"Abel",
"Abril Fatface"=>"Abril Fatface",
"Aclonica"=>"Aclonica",
"Actor"=>"Actor",
"Astloch:regular,bold"=>"Astloch (plus bold)",
//...etc
)
?>
是否存在以这种方式获取字体的API?
答案
我不确定你是否正在寻找一个阵列,但最近的输出(2013年3月10日)来自谷歌,花了我3个小时来解决这个问题,如果这个阵列有帮助吗?
$googlefonts = array("ABeeZee" => "ABeeZee",
"Abel" => "Abel",
"Abril Fatface" => "Abril+Fatface",
"Aclonica" => "Aclonica",
"Acme" => "Acme",
"Actor" => "Actor",
"Adamina" => "Adamina",
"Advent Pro" => "Advent+Pro",
"Aguafina Script" => "Aguafina+Script",
"Akronim" => "Akronim",
"Aladin" => "Aladin",
"Aldrich" => "Aldrich",
"Alegreya" => "Alegreya",
"Alegreya SC" => "Alegreya+SC",
"Alex Brush" => "Alex+Brush",
"Alfa Slab One" => "Alfa+Slab+One",
"Alice" => "Alice",
"Alike" => "Alike",
"Alike Angular" => "Alike+Angular",
"Allan" => "Allan",
"Allerta" => "Allerta",
"Allerta Stencil" => "Allerta+Stencil",
"Allura" => "Allura",
"Almendra" => "Almendra",
"Almendra Display" => "Almendra+Display",
"Almendra SC" => "Almendra+SC",
"Amarante" => "Amarante",
"Amaranth" => "Amaranth",
"Amatic SC" => "Amatic+SC",
"Amethysta" => "Amethysta",
"Anaheim" => "Anaheim",
"Andada" => "Andada",
"Andika" => "Andika",
"Angkor" => "Angkor",
"Annie Use Your Telescope" => "Annie+Use+Your+Telescope",
"Anonymous Pro" => "Anonymous+Pro",
"Antic" => "Antic",
"Antic Didone" => "Antic+Didone",
"Antic Slab" => "Antic+Slab",
"Anton" => "Anton",
"Arapey" => "Arapey",
"Arbutus" => "Arbutus",
"Arbutus Slab" => "Arbutus+Slab",
"Architects Daughter" => "Architects+Daughter",
"Archivo Black" => "Archivo+Black",
"Archivo Narrow" => "Archivo+Narrow",
"Arimo" => "Arimo",
"Arizonia" => "Arizonia",
"Armata" => "Armata",
"Artifika" => "Artifika",
"Arvo" => "Arvo",
"Asap" => "Asap",
"Asset" => "Asset",
"Astloch" => "Astloch",
"Asul" => "Asul",
"Atomic Age" => "Atomic+Age",
"Aubrey" => "Aubrey",
"Audiowide" => "Audiowide",
"Autour One" => "Autour+One",
"Average" => "Average",
"Average Sans" => "Average+Sans",
"Averia Gruesa Libre" => "Averia+Gruesa+Libre",
"Averia Libre" => "Averia+Libre",
"Averia Sans Libre" => "Averia+Sans+Libre",
"Averia Serif Libre" => "Averia+Serif+Libre",
"Bad Script" => "Bad+Script",
"Balthazar" => "Balthazar",
"Bangers" => "Bangers",
"Basic" => "Basic",
"Battambang" => "Battambang",
"Baumans" => "Baumans",
"Bayon" => "Bayon",
"Belgrano" => "Belgrano",
"Belleza" => "Belleza",
"BenchNine" => "BenchNine",
"Bentham" => "Bentham",
"Berkshire Swash" => "Berkshire+Swash",
"Bevan" => "Bevan",
"Bigelow Rules" => "Bigelow+Rules",
"Bigshot One" => "Bigshot+One",
"Bilbo" => "Bilbo",
"Bilbo Swash Caps" => "Bilbo+Swash+Caps",
"Bitter" => "Bitter",
"Black Ops One" => "Black+Ops+One",
"Bokor" => "Bokor",
"Bonbon" => "Bonbon",
"Boogaloo" => "Boogaloo",
"Bowlby One" => "Bowlby+One",
"Bowlby One SC" => "Bowlby+One+SC",
"Brawler" => "Brawler",
"Bree Serif" => "Bree+Serif",
"Bubblegum Sans" => "Bubblegum+Sans",
"Bubbler One" => "Bubbler+One",
"Buda" => "Buda",
"Buenard" => "Buenard",
"Butcherman" => "Butcherman",
"Butterfly Kids" => "Butterfly+Kids",
"Cabin" => "Cabin",
"Cabin Condensed" => "Cabin+Condensed",
"Cabin Sketch" => "Cabin+Sketch",
"Caesar Dressing" => "Caesar+Dressing",
"Cagliostro" => "Cagliostro",
"Calligraffitti" => "Calligraffitti",
"Cambo" => "Cambo",
"Candal" => "Candal",
"Cantarell" => "Cantarell",
"Cantata One" => "Cantata+One",
"Cantora One" => "Cantora+One",
"Capriola" => "Capriola",
"Cardo" => "Cardo",
"Carme" => "Carme",
"Carrois Gothic" => "Carrois+Gothic",
"Carrois Gothic SC" => "Carrois+Gothic+SC",
"Carter One" => "Carter+One",
"Caudex" => "Caudex",
"Cedarville Cursive" => "Cedarville+Cursive",
"Ceviche One" => "Ceviche+One",
"Changa One" => "Changa+One",
"Chango" => "Chango",
"Chau Philomene One" => "Chau+Philomene+One",
"Chela One" => "Chela+One",
"Chelsea Market" => "Chelsea+Market",
"Chenla" => "Chenla",
"Cherry Cream Soda" => "Cherry+Cream+Soda",
"Cherry Swash" => "Cherry+Swash",
"Chewy" => "Chewy",
"Chicle" => "Chicle",
"Chivo" => "Chivo",
"Cinzel" => "Cinzel",
"Cinzel Decorative" => "Cinzel+Decorative",
"Clicker Script" => "Clicker+Script",
"Coda" => "Coda",
"Coda Caption" => "Coda+Caption",
"Codystar" => "Codystar",
"Combo" => "Combo",
"Comfortaa" => "Comfortaa",
"Coming Soon" => "Coming+Soon",
"Concert One" => "Concert+One",
"Condiment" => "Condiment",
"Content" => "Content",
"Contrail One" => "Contrail+One",
"Convergence" => "Convergence",
"Cookie" => "Cookie",
"Copse" => "Copse",
"Corben" => "Corben",
"Courgette" => "Courgette",
"Cousine" => "Cousine",
"Coustard" => "Coustard",
"Covered By Your Grace" => "Covered+By+Your+Grace",
"Crafty Girls" => "Crafty+Girls",
"Creepster" => "Creepster",
"Crete Round" => "Crete+Round",
"Crimson Text" => "Crimson+Text",
"Croissant One" => "Croissant+One",
"Crushed" => "Crushed",
"Cuprum" => "Cuprum",
"Cutive" => "Cutive",
"Cutive Mono" => "Cutive+Mono",
"Damion" => "Damion",
"Dancing Script" => "Dancing+Script",
"Dangrek" => "Dangrek",
"Dawning of a New Day" => "Dawning+of+a+New+Day",
"Days One" => "Days+One",
"Delius" => "Delius",
"Delius Swash Caps" => "Delius+Swash+Caps",
"Delius Unicase" => "Delius+Unicase",
"Della Respira" => "Della+Respira",
"Denk One" => "Denk+One",
"Devonshire" => "Devonshire",
"Didact Gothic" => "Didact+Gothic",
"Diplomata" => "Diplomata",
"Diplomata SC" => "Diplomata+SC",
"Domine" => "Domine",
"Donegal One" => "Donegal+One",
"Doppio One" => "Doppio+One",
"Dorsa" => "Dorsa",
"Dosis" => "Dosis",
"Dr Sugiyama" => "Dr+Sugiyama",
"Droid Sans" => "Droid+Sans",
"Droid Sans Mono" => "Droid+Sans+Mono",
"Droid Serif" => "Droid+Serif",
"Duru Sans" => "Duru+Sans",
"Dynalight" => "Dynalight",
"EB Garamond" => "EB+Garamond",
"Eagle Lake" => "Eagle+Lake",
"Eater" => "Eater",
"Economica" => "Economica",
"Electrolize" => "Electrolize",
"Elsie" => "Elsie",
"Elsie Swash Caps" => "Elsie+Swash+Caps",
"Emblema One" => "Emblema+One",
"Emilys Candy" => "Emilys+Candy",
"Engagement" => "Engagement",
"Englebert" => "Englebert",
"Enriqueta" => "Enriqueta",
"Erica One" => "Erica+One",
"Esteban" => "Esteban",
"Euphoria Script" => "Euphoria+Script",
"Ewert" => "Ewert",
"Exo" => "Exo",
"Expletus Sans" => "Expletus+Sans",
"Fanwood Text" => "Fanwood+Text",
"Fascinate" => "Fascinate",
"Fascinate Inline" => "Fascinate+Inline",
"Faster One" => "Faster+One",
"Fasthand" => "Fasthand",
"Federant" => "Federant",
"Federo" => "Federo",
"Felipa" => "Felipa",
"Fenix" => "Fenix",
"Finger Paint" => "Finger+Paint",
"Fjalla One" => "Fjalla+One",
"Fjord One" => "Fjord+One",
"Flamenco" => "Flamenco",
"Flavors" => "Flavors",
"Fondamento" => "Fondamento",
"Fontdiner Swanky" => "Fontdiner+Swanky",
"Forum" => "Forum",
"Francois One" => "Francois+One",
"Freckle Face" => "Freckle+Face",
"Fredericka the Great" => "Fredericka+the+Great",
"Fredoka One" => "Fredoka+One",
"Freehand" => "Freehand",
"Fresca" => "Fresca",
"Frijole" => "Frijole",
"Fruktur" => "Fruktur",
"Fugaz One" => "Fugaz+One",
"GFS Didot" => "GFS+Didot",
"GFS Neohellenic" => "GFS+Neohellenic",
"Gabriela" => "Gabriela",
"Gafata" => "Gafata",
"Galdeano" => "Galdeano",
"Galindo" => "Galindo",
"Gentium Basic" => "Gentium+Basic",
"Gentium Book Basic" => "Gentium+Book+Basic",
"Geo" => "Geo",
"Geostar" => "Geostar",
"Geostar Fill" => "Geostar+Fill",
"Germania One" => "Germania+One",
"Gilda Display" => "Gilda+Display",
"Give You Glory" => "Give+You+Glory",
"Glass Antiqua" => "Glass+Antiqua",
"Glegoo" => "Glegoo",
"Gloria Hallelujah" => "Gloria+Hallelujah",
"Goblin One" => "Goblin+One",
"Goc以上是关于如何将Google网络字体动态加载到数组中? [关闭]的主要内容,如果未能解决你的问题,请参考以下文章