CINXE.COM
google_fonts | Flutter package
<!DOCTYPE html> <html lang="en-us"><head><script src="https://www.googletagmanager.com/gtm.js?id=GTM-MX6DBN9" async="async"></script><script src="/static/hash-o6oemknr/js/gtm.js" async="async"></script><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@dart_lang"/><meta name="twitter:description" content="A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling."/><meta name="twitter:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:type" content="website"/><meta property="og:site_name" content="Dart packages"/><meta property="og:title" content="google_fonts | Flutter package"/><meta property="og:description" content="A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling."/><meta property="og:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:url" content="https://pub.dev/packages/google_fonts"/><title>google_fonts | Flutter package</title><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Display:wght@400&family=Google+Sans+Text:wght@400;500;700&family=Google+Sans+Mono:wght@400;700&display=swap"/><link rel="shortcut icon" href="/static/hash-o6oemknr/img/flutter-logo-32x32.png"/><link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/><link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/><link rel="canonical" href="https://pub.dev/packages/google_fonts"/><meta name="description" content="A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling."/><link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/material/bundle/styles.css"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/css/style.css"/><script src="/static/hash-o6oemknr/material/bundle/script.min.js" defer="defer"></script><script src="/static/hash-o6oemknr/js/script.dart.js" defer="defer"></script><script src="https://www.gstatic.com/brandstudio/kato/cookie_choice_component/cookie_consent_bar.v3.js" defer="defer" data-autoload-cookie-consent-bar="true"></script><meta name="pub-page-data" content="eyJwa2dEYXRhIjp7InBhY2thZ2UiOiJnb29nbGVfZm9udHMiLCJ2ZXJzaW9uIjoiNi4yLjEiLCJsaWtlcyI6NTk2NCwicHVibGlzaGVySWQiOiJtYXRlcmlhbC5pbyIsImlzRGlzY29udGludWVkIjpmYWxzZSwiaXNMYXRlc3QiOnRydWV9LCJzZXNzaW9uQXdhcmUiOmZhbHNlfQ=="/><link rel="preload" href="/static/hash-o6oemknr/highlight/highlight-with-init.js" as="script"/></head><body class="light-theme"><script src="/static/hash-o6oemknr/js/dark-init.js"></script><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MX6DBN9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div class="site-header"><button class="hamburger" aria-label="menu toggle"></button><a class="logo" href="/"><img class="site-logo" src="/static/hash-o6oemknr/img/pub-dev-logo.svg" alt="" width="140" height="30" role="presentation"/></a><div class="site-header-space"></div><div class="site-header-mask"></div><div class="site-header-search"><form action="/packages" method="GET"><input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search"/></form></div><nav class="site-header-nav scroll-container"><div class="nav-login-container"><button id="-account-login" class="nav-main-button link">Sign in</button></div><div class="nav-container nav-help-container hoverable"><button class="nav-main-button">Help</button><div class="nav-hover-popup"><div class="nav-table-columns"><div class="nav-table-column"><h3>Pub.dev</h3><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div><div class="nav-table-column"><h3>Flutter</h3><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div><div class="nav-table-column"><h3>Dart</h3><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Pub.dev <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Flutter <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Dart <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></nav></div><div id="banner-container"></div><main class="container"><div class="detail-wrapper -active -has-info-box"><div class="detail-banners"><a href="https://flutter.dev/docs/development/packages-and-plugins/favorites" rel="noopener" target="_blank"><img class="ff-banner ff-banner-desktop displayed-in-light-theme" src="/static/hash-o6oemknr/img/ff-banner-desktop-2x.png" alt="" width="150" height="218" title="Package is a Flutter Favorite" role="presentation"/><img class="ff-banner ff-banner-desktop displayed-in-dark-theme" src="/static/hash-o6oemknr/img/ff-banner-desktop-dark-2x.png" alt="" width="150" height="218" title="Package is a Flutter Favorite" role="presentation"/><img class="ff-banner ff-banner-mobile displayed-in-light-theme" src="/static/hash-o6oemknr/img/ff-banner-mobile-2x.png" alt="" width="94" height="116" title="Package is a Flutter Favorite" role="presentation"/><img class="ff-banner ff-banner-mobile displayed-in-dark-theme" src="/static/hash-o6oemknr/img/ff-banner-mobile-dark-2x.png" alt="" width="94" height="116" title="Package is a Flutter Favorite" role="presentation"/></a></div><div class="detail-header -is-loose"><div class="detail-container"><div class="detail-header-outer-block"><div class="detail-header-content-block"><h1 class="title">google_fonts 6.2.1 <span class="pkg-page-title-copy"><img class="pkg-page-title-copy-icon filter-invert-on-dark" src="/static/hash-o6oemknr/img/content-copy-icon.svg" alt="copy "google_fonts: ^6.2.1" to clipboard" width="18" height="18" title="Copy "google_fonts: ^6.2.1" to clipboard" data-copy-content="google_fonts: ^6.2.1" data-ga-click-event="copy-package-version"/><div class="pkg-page-title-copy-feedback"><span class="code">google_fonts: ^6.2.1</span> copied to clipboard</div></span></h1><div class="metadata">Published <span><a class="-x-ago" href="" title="Mar 4, 2024" aria-label="8 months ago" aria-role="button" role="button" data-timestamp="1709537359639">8 months ago</a></span> • <a class="-pub-publisher" href="/publishers/material.io"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>material.io</a><span class="package-badge" title="Package is compatible with Dart 3.">Dart 3 compatible</span></div><div class="detail-tags-and-like"><div class="detail-tags"><div class="-pub-tag-badge"><span class="tag-badge-main">SDK</span><a class="tag-badge-sub" href="/packages?q=sdk%3Aflutter" rel="nofollow" title="Packages compatible with Flutter SDK">Flutter</a></div><div class="-pub-tag-badge"><span class="tag-badge-main">Platform</span><a class="tag-badge-sub" href="/packages?q=platform%3Aandroid" rel="nofollow" title="Packages compatible with Android platform">Android</a><a class="tag-badge-sub" href="/packages?q=platform%3Aios" rel="nofollow" title="Packages compatible with iOS platform">iOS</a><a class="tag-badge-sub" href="/packages?q=platform%3Alinux" rel="nofollow" title="Packages compatible with Linux platform">Linux</a><a class="tag-badge-sub" href="/packages?q=platform%3Amacos" rel="nofollow" title="Packages compatible with macOS platform">macOS</a><a class="tag-badge-sub" href="/packages?q=platform%3Aweb" rel="nofollow" title="Packages compatible with Web platform">web</a><a class="tag-badge-sub" href="/packages?q=platform%3Awindows" rel="nofollow" title="Packages compatible with Windows platform">Windows</a></div></div><div class="detail-like"><button id="-pub-like-icon-button" class="mdc-icon-button" data-ga-click-event="toggle-like" aria-pressed="false" title="Like this package"><img class="mdc-icon-button__icon" src="/static/hash-o6oemknr/img/like-inactive.svg" alt="liked status: inactive" width="18" height="18"/><img class="mdc-icon-button__icon mdc-icon-button__icon--on" src="/static/hash-o6oemknr/img/like-active.svg" alt="liked status: active" width="18" height="18"/></button><span class="likes-count"><span id="likes-count">5.9k</span></span></div></div></div></div></div></div><div class="detail-container"><div class="detail-lead"><div class="detail-metadata-toggle"><div class="detail-metadata-toggle-icon">→</div><h3 class="detail-lead-title">Metadata</h3></div><p class="detail-lead-text">A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.</p><p class="detail-lead-more"><a class="detail-metadata-toggle">More...</a></p></div></div><div class="detail-body"><div class="detail-tabs"><div class="detail-tabs-wide-header"><div class="detail-container"><ul class="detail-tabs-header"><li class="detail-tab tab-button detail-tab-readme-title -active">Readme</li><li class="detail-tab tab-link detail-tab-changelog-title"><a href="/packages/google_fonts/changelog" role="button">Changelog</a></li><li class="detail-tab tab-link detail-tab-example-title"><a href="/packages/google_fonts/example" role="button">Example</a></li><li class="detail-tab tab-link detail-tab-installing-title"><a href="/packages/google_fonts/install" role="button">Installing</a></li><li class="detail-tab tab-link detail-tab-versions-title"><a href="/packages/google_fonts/versions" role="button">Versions</a></li><li class="detail-tab tab-link detail-tab-analysis-title"><a href="/packages/google_fonts/score" role="button">Scores</a></li></ul></div></div><div class="detail-container detail-body-main"><div class="detail-tabs-content"><section class="tab-content detail-tab-readme-content -active markdown-body"><h1 class="hash-header" id="google_fonts">google_fonts <a href="#google_fonts" class="hash-link">#</a></h1> <p><a href="https://pub.dev/packages/google_fonts"><img src="https://img.shields.io/pub/v/google_fonts.svg" alt="pub package"></a></p> <p>A Flutter package to use fonts from <a href="https://fonts.google.com/" rel="ugc">fonts.google.com</a>.</p> <img alt="changing fonts with google_fonts and hot reload" src="https://user-images.githubusercontent.com/6655696/161121395-bbda7d3e-0842-4fe2-b428-9b2f29da8a8f.gif" width="100%"> <h2 class="hash-header" id="features">Features <a href="#features" class="hash-link">#</a></h2> <p><a href="https://www.youtube.com/watch?v=8Vzv2CdbEY0" rel="ugc"><img src="https://img.youtube.com/vi/8Vzv2CdbEY0/0.jpg" alt="video thumbnail"></a></p> <ul> <li>HTTP fetching at runtime, ideal for development. Can also be used in production to reduce app size</li> <li>Font file caching, on device file system</li> <li>Font bundling in assets. Matching font files found in assets are prioritized over HTTP fetching. Useful for offline-first apps.</li> </ul> <h2 class="hash-header" id="usage">Usage <a href="#usage" class="hash-link">#</a></h2> <p>For example, say you want to use the <a href="https://fonts.google.com/specimen/Lato" rel="ugc">Lato</a> font from Google Fonts in your Flutter app.</p> <ol> <li> <p>Add the <code>google_fonts</code> package to your <a href="https://pub.dev/packages/google_fonts/install">pubspec dependencies</a>.</p> </li> <li> <p>Import <code>GoogleFonts</code>.</p> <pre><code class="language-dart">import 'package:google_fonts/google_fonts.dart'; </code></pre> </li> </ol> <h3 class="hash-header" id="text-styles">Text styles <a href="#text-styles" class="hash-link">#</a></h3> <p>To use <code>GoogleFonts</code> with the default <code>TextStyle</code>:</p> <pre><code class="language-dart">Text( 'This is Google Fonts', style: GoogleFonts.lato(), ), </code></pre> <p>Or, if you want to load the font dynamically:</p> <pre><code class="language-dart">Text( 'This is Google Fonts', style: GoogleFonts.getFont('Lato'), ), </code></pre> <p>To use <code>GoogleFonts</code> with an existing <code>TextStyle</code>:</p> <pre><code class="language-dart">Text( 'This is Google Fonts', style: GoogleFonts.lato( textStyle: TextStyle(color: Colors.blue, letterSpacing: .5), ), ), </code></pre> <p>or</p> <pre><code class="language-dart">Text( 'This is Google Fonts', style: GoogleFonts.lato(textStyle: Theme.of(context).textTheme.headline4), ), </code></pre> <p>To override the <code>fontSize</code>, <code>fontWeight</code>, or <code>fontStyle</code>:</p> <pre><code class="language-dart">Text( 'This is Google Fonts', style: GoogleFonts.lato( textStyle: Theme.of(context).textTheme.displayLarge, fontSize: 48, fontWeight: FontWeight.w700, fontStyle: FontStyle.italic, ), ), </code></pre> <h3 class="hash-header" id="text-themes">Text themes <a href="#text-themes" class="hash-link">#</a></h3> <p>You can also use <code>GoogleFonts.latoTextTheme()</code> to make or modify an entire text theme to use the "Lato" font.</p> <pre><code class="language-dart">... return MaterialApp( theme: _buildTheme(Brightness.dark), ); } ThemeData _buildTheme(brightness) { var baseTheme = ThemeData(brightness: brightness); return baseTheme.copyWith( textTheme: GoogleFonts.latoTextTheme(baseTheme.textTheme), ); } </code></pre> <p>Or, if you want a <code>TextTheme</code> where a couple of styles should use a different font:</p> <pre><code class="language-dart">final textTheme = Theme.of(context).textTheme; MaterialApp( theme: ThemeData( textTheme: GoogleFonts.latoTextTheme(textTheme).copyWith( bodyMedium: GoogleFonts.oswald(textStyle: textTheme.bodyMedium), ), ), ); </code></pre> <h3 class="hash-header" id="visual-font-swapping">Visual font swapping <a href="#visual-font-swapping" class="hash-link">#</a></h3> <p>To avoid visual font swaps that occur when a font is loading, use <a href="https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html">FutureBuilder</a> and <a href="https://pub.dev/documentation/google_fonts/latest/google_fonts/GoogleFonts/pendingFonts.html">GoogleFonts.pendingFonts()</a>.</p> <p>See the <a href="https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/example/lib/main.dart" rel="ugc">example app</a>.</p> <h3 class="hash-header" id="http-fetching">HTTP fetching <a href="#http-fetching" class="hash-link">#</a></h3> <p>For HTTP fetching to work, certain platforms require additional steps when running the app in debug and/or release mode. For example, macOS requires the following be present in the relevant .entitlements file:</p> <pre><code><key>com.apple.security.network.client</key> <true/> </code></pre> <p>Learn more at <a href="https://docs.flutter.dev/development/data-and-backend/networking#platform-notes" rel="ugc">https://docs.flutter.dev/development/data-and-backend/networking#platform-notes</a>.</p> <h2 class="hash-header" id="bundling-fonts-when-releasing">Bundling fonts when releasing <a href="#bundling-fonts-when-releasing" class="hash-link">#</a></h2> <p>The <code>google_fonts</code> package will automatically use matching font files in your <code>pubspec.yaml</code>'s <code>assets</code> (rather than fetching them at runtime via HTTP). Once you've settled on the fonts you want to use:</p> <ol> <li>Download the font files from <a href="https://fonts.google.com" rel="ugc">https://fonts.google.com</a>. You only need to download the weights and styles you are using for any given family. Italic styles will include <code>Italic</code> in the filename. Font weights map to file names as follows:</li> </ol> <pre><code class="language-dart">{ FontWeight.w100: 'Thin', FontWeight.w200: 'ExtraLight', FontWeight.w300: 'Light', FontWeight.w400: 'Regular', FontWeight.w500: 'Medium', FontWeight.w600: 'SemiBold', FontWeight.w700: 'Bold', FontWeight.w800: 'ExtraBold', FontWeight.w900: 'Black', } </code></pre> <ol start="2"> <li>Move those fonts to some asset folder (e.g. <code>google_fonts</code>). You can name this folder whatever you like and use subdirectories.</li> </ol> <p><img src="https://user-images.githubusercontent.com/19559602/216036655-d737c267-85d8-4654-886a-fc53a48d31c1.png" alt=""></p> <ol start="3"> <li>Ensure that you have listed the asset folder (e.g. <code>google_fonts/</code>) in your <code>pubspec.yaml</code>, under <code>assets</code>.</li> </ol> <p><img src="https://user-images.githubusercontent.com/19559602/216036666-0aa1ae8e-7f7b-4a6a-bb84-7f6204cf14db.png" alt=""></p> <p>Note: Since these files are listed as assets, there is no need to list them in the <code>fonts</code> section of the <code>pubspec.yaml</code>. This can be done because the files are consistently named from the Google Fonts API (so be sure not to rename them!)</p> <p>See the <a href="https://pub.dev/documentation/google_fonts/latest/google_fonts/GoogleFonts/config.html">API docs</a> to completely disable HTTP fetching.</p> <h2 class="hash-header" id="licensing-fonts">Licensing Fonts <a href="#licensing-fonts" class="hash-link">#</a></h2> <p>The fonts on <a href="https://fonts.google.com/" rel="ugc">fonts.google.com</a> include license files for each font. For example, the <a href="https://fonts.google.com/specimen/Lato" rel="ugc">Lato</a> font comes with an <code>OFL.txt</code> file.</p> <p>Once you've decided on the fonts you want in your published app, you should add the appropriate licenses to your flutter app's <a href="https://api.flutter.dev/flutter/foundation/LicenseRegistry-class.html">LicenseRegistry</a>.</p> <p>For example:</p> <pre><code class="language-dart">void main() { LicenseRegistry.addLicense(() async* { final license = await rootBundle.loadString('google_fonts/OFL.txt'); yield LicenseEntryWithLineBreaks(['google_fonts'], license); }); runApp(...); } </code></pre> <h2 class="hash-header" id="testing">Testing <a href="#testing" class="hash-link">#</a></h2> <p>See <a href="https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/example/test" rel="ugc">example/test</a> for testing examples.</p> </section></div></div></div><aside class="detail-info-box"><a class="packages-scores" href="/packages/google_fonts/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">5964</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">100</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><div class="detail-screenshot-thumbnail"><div class="thumbnail-container" data-thumbnail="/packages/google_fonts/versions/6.2.1/gen-res/gen/logo_mashup.webp,/packages/google_fonts/versions/6.2.1/gen-res/gen/hot_reload.webp" data-thumbnail-descriptions-json="["Google Fonts and Flutter logos.","Using hot reload to change the font family."]" data-ga-click-event="screenshot-thumbnail-click"><img class="thumbnail-image" src="/packages/google_fonts/versions/6.2.1/gen-res/gen/190x190/logo_mashup.webp" alt="screenshot" title="View screenshots" tabindex="0"/></div><img class="collections-icon" src="/static/hash-o6oemknr/img/collections_white_24dp.svg" alt="" width="30" height="30" role="presentation"/></div><h3 class="title">Publisher</h3><p><a href="/publishers/material.io"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>material.io</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.</p><p><a class="link" href="https://github.com/material-foundation/flutter-packages/tree/main/packages/google_fonts" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/material-foundation/flutter-packages/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_fonts%22" rel="ugc">View/report issues</a><br/><a class="link" href="https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/google_fonts/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>Apache-2.0 (<a href="/packages/google_fonts/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="/packages/crypto" title="^3.0.0">crypto</a>, <a href="https://api.flutter.dev/">flutter</a>, <a href="/packages/http" title="^1.0.0">http</a>, <a href="/packages/path_provider" title="^2.0.0">path_provider</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Agoogle_fonts" rel="nofollow">Packages that depend on google_fonts</a></p></aside></div><script type="application/ld+json">{"@context":"http\u003a\u002f\u002fschema.org","@type":"SoftwareSourceCode","name":"google\u005ffonts","version":"6.2.1","description":"google\u005ffonts - A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.","url":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fgoogle\u005ffonts","dateCreated":"2019-11-20T13\u003a47\u003a33.272310Z","dateModified":"2024-03-04T07\u003a29\u003a19.639950Z","programmingLanguage":"Dart","image":"https\u003a\u002f\u002fpub.dev\u002fstatic\u002fimg\u002fpub-dev-icon-cover-image.png","license":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fgoogle\u005ffonts\u002flicense"}</script></div><div class="detail-metadata"><h3 class="detail-metadata-title"><span class="detail-metadata-toggle">←</span> Metadata</h3><div class="detail-info-box"><a class="packages-scores" href="/packages/google_fonts/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">5964</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">100</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><div class="detail-screenshot-thumbnail"><div class="thumbnail-container" data-thumbnail="/packages/google_fonts/versions/6.2.1/gen-res/gen/logo_mashup.webp,/packages/google_fonts/versions/6.2.1/gen-res/gen/hot_reload.webp" data-thumbnail-descriptions-json="["Google Fonts and Flutter logos.","Using hot reload to change the font family."]" data-ga-click-event="screenshot-thumbnail-click"><img class="thumbnail-image" src="/packages/google_fonts/versions/6.2.1/gen-res/gen/190x190/logo_mashup.webp" alt="screenshot" title="View screenshots" tabindex="0"/></div><img class="collections-icon" src="/static/hash-o6oemknr/img/collections_white_24dp.svg" alt="" width="30" height="30" role="presentation"/></div><h3 class="title">Publisher</h3><p><a href="/publishers/material.io"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>material.io</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>A Flutter package to use fonts from fonts.google.com. Supports HTTP fetching, caching, and asset bundling.</p><p><a class="link" href="https://github.com/material-foundation/flutter-packages/tree/main/packages/google_fonts" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/material-foundation/flutter-packages/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_fonts%22" rel="ugc">View/report issues</a><br/><a class="link" href="https://github.com/material-foundation/flutter-packages/blob/main/packages/google_fonts/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/google_fonts/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>Apache-2.0 (<a href="/packages/google_fonts/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="/packages/crypto" title="^3.0.0">crypto</a>, <a href="https://api.flutter.dev/">flutter</a>, <a href="/packages/http" title="^1.0.0">http</a>, <a href="/packages/path_provider" title="^2.0.0">path_provider</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Agoogle_fonts" rel="nofollow">Packages that depend on google_fonts</a></p></div><p class="detail-lead-back"><a class="detail-metadata-toggle">Back</a></p></div><div id="-screenshot-carousel" class="carousel"><fab id="-carousel-prev" class="mdc-fab carousel-prev carousel-nav" data-mdc-auto-init="MDCRipple" title="Previous" data-ga-click-event="screenshot-carousel-prev-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_left.svg" alt="previous" width="24" height="24" aria-hidden="true"/></fab><div id="-image-container" class="image-container"></div><fab id="-carousel-next" class="mdc-fab carousel-next carousel-nav" data-mdc-auto-init="MDCRipple" title="Next" data-ga-click-event="screenshot-carousel-next-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_right.svg" alt="next" width="24" height="24" aria-hidden="true"/></fab><p id="-screenshot-description" class="screenshot-description"></p></div></main><footer class="site-footer"><a class="link" href="https://dart.dev/">Dart language</a><a class="link sep" href="/report?subject=package%3Agoogle_fonts&url=https%3A%2F%2Fpub.dev%2Fpackages%2Fgoogle_fonts">Report package</a><a class="link sep" href="/policy">Policy</a><a class="link sep" href="https://www.google.com/intl/en/policies/terms/">Terms</a><a class="link sep" href="https://developers.google.com/terms/">API Terms</a><a class="link sep" href="/security">Security</a><a class="link sep" href="https://www.google.com/intl/en/policies/privacy/">Privacy</a><a class="link sep" href="/help">Help</a><a class="link icon sep" href="/feed.atom"><img class="inline-icon" src="/static/hash-o6oemknr/img/rss-feed-icon.svg" alt="RSS" width="20" height="20" title="RSS/atom feed"/></a><a class="link icon github_issue" href="https://github.com/dart-lang/pub-dev/issues/new"><img class="inline-icon" src="/static/hash-o6oemknr/img/bug-report-white-96px.png" alt="bug report" width="20" height="20" title="Report an issue with this site"/></a></footer><script src="/static/hash-o6oemknr/highlight/highlight-with-init.js" defer="defer"></script></body></html>