<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kelli Blalock</title>
    <description>The latest articles on DEV Community by Kelli Blalock (@kelli).</description>
    <link>https://dev.to/kelli</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F111123%2Fde5e5cfa-a3ea-44a2-bbd6-b560fb41da69.png</url>
      <title>DEV Community: Kelli Blalock</title>
      <link>https://dev.to/kelli</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kelli"/>
    <language>en</language>
    <item>
      <title>How to Self-Host Google Fonts on Your Own Server</title>
      <dc:creator>Kelli Blalock</dc:creator>
      <pubDate>Tue, 19 Feb 2019 01:55:40 +0000</pubDate>
      <link>https://dev.to/kelli/how-to-self-host-google-fonts-on-your-own-server-d4i</link>
      <guid>https://dev.to/kelli/how-to-self-host-google-fonts-on-your-own-server-d4i</guid>
      <description>&lt;p&gt;Google recommends that you use the code that they supply for using Google Fonts on a website in their &lt;a href="https://developers.google.com/fonts/faq"&gt;FAQ&lt;/a&gt;, but if you want full control of the fonts being displayed, self-hosting Google Fonts on your own server is an option. &lt;/p&gt;

&lt;h2&gt;
  
  
  Why Self-Host Google Fonts
&lt;/h2&gt;

&lt;p&gt;One might expect that the font shown on a website using Google Fonts won't change after picking out the font, however it can change without your knowledge. Because Google serves the latest version of a font, at any time the font might change to a new version without any notice (&lt;a href="https://github.com/google/fonts/issues/1307"&gt;example of an issue where this happened&lt;/a&gt;). I doubt there would be a drastic change, but it's possible that there might be a change to the font served by Google that you don't like.&lt;/p&gt;

&lt;p&gt;Performance is another reason why developers self-host Google Fonts, however some developers say self-hosting Google Fonts is faster and some say it's not. On the one hand, you have Google's optimized servers in locations all around the world and on the other hand, you have less trips to a third party server. That's simplifying it a bit, but maybe it's one of those things you have to test for yourself.&lt;/p&gt;

&lt;p&gt;In my case, I tried self-hosting a Google Font to help resolve a FOUT (Flash of Unstyled Text) issue that was happening when loading my website with Edge. It didn't fix my problem, but I'm glad I learned how to self-host Google Fonts while trying to fix it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Get Google Fonts for Self-Hosting
&lt;/h2&gt;

&lt;p&gt;The fonts you find at &lt;a href="https://fonts.google.com/"&gt;fonts.google.com&lt;/a&gt; will have a download button that lets you download the font, but you'll only get font files with the &lt;code&gt;.ttf&lt;/code&gt; extension. For modern browsers, you'll likely want the &lt;code&gt;.woff2&lt;/code&gt; and &lt;code&gt;.woff&lt;/code&gt; versions of the font which use compression and are likely to load faster. You can get the &lt;code&gt;.woff&lt;/code&gt; and &lt;code&gt;.woff2&lt;/code&gt; versions of Google Fonts from &lt;a href="https://google-webfonts-helper.herokuapp.com"&gt;google-webfonts-helper.herokuapp.com&lt;/a&gt; which is not an official Google site, but is linked to from the &lt;a href="https://github.com/google/fonts"&gt;google/fonts GitHub Repository README&lt;/a&gt; as a place to go for help with self hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps for Self-Hosting Google Fonts
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Note: Before self-hosting a font, it's a good idea to read the font license and make sure you can follow license requirements for the font. See "Take Care to Follow the Font License" below.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to  &lt;a href="https://google-webfonts-helper.herokuapp.com"&gt;google-webfonts-helper&lt;/a&gt;  and select the font you'd like to download.&lt;/li&gt;
&lt;li&gt;Under "Copy CSS" choose "Modern Browsers" for supporting current browsers that use &lt;code&gt;.woff&lt;/code&gt; and &lt;code&gt;.woff2&lt;/code&gt; or "Best Support" if you want to support older browsers too. 

&lt;ul&gt;
&lt;li&gt;See &lt;a href="https://css-tricks.com/snippets/css/using-font-face/"&gt;CSS-Tricks - Using @font-face&lt;/a&gt; which is mentioned on the google-webfonts-helper site if you need help determining which one to choose and how to customize the &lt;code&gt;@fontface&lt;/code&gt; block to match your site's level of support.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Copy the CSS given for the font and add it to the appropriate stylesheet for your site.

&lt;ul&gt;
&lt;li&gt;You can add the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display"&gt;font-display&lt;/a&gt; property to the &lt;code&gt;@font-face&lt;/code&gt; block if desired to help control FOUT (Flash of Unstyled Text) and FOIT (Flash of Invisible Text) on browsers that support it (see &lt;a href="https://css-tricks.com/font-display-masses/"&gt;font-display for the masses&lt;/a&gt; if you're unfamiliar with &lt;code&gt;font-display&lt;/code&gt; and &lt;a href="https://caniuse.com/#feat=css-font-rendering-controls"&gt;caniuse.com for CSS font-rendering controls&lt;/a&gt; for info on browser support). Note that IE and Edge are among the browsers that don't support it.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Under "Download files" click the button to download the font's zip file and then  extract the files and add them to your project.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Take Care to Follow the Font License
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Note: This is information I've found about Google Font licenses that I hope will be helpful, but I'm not a lawyer and this isn't legal advice. You should read the font license information yourself since you're responsible for following it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you download files from &lt;a href="https://google-webfonts-helper.herokuapp.com"&gt;google-webfonts-helper&lt;/a&gt;, it doesn't include a text document with the font license. Below the download button, it says "See &lt;a href="https://fonts.google.com/attribution"&gt;Google Fonts Open Source Font Attribution&lt;/a&gt; to find out the specific license that this font uses." That link isn't to the actual text document license for the font, so I looked deeper to find one. &lt;/p&gt;

&lt;p&gt;According to the &lt;a href="https://github.com/google/fonts"&gt;google/fonts repo&lt;/a&gt;, it has a license in the directory for each font family, so you may want to find the license for your font in this repo and read it. I did, and it made me want to add a copy of that license in the directory with the font I was using.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;

&lt;p&gt;Since I was looking for the Quattrocento Sans font which uses the SIL Open Font License, I found the license text file under &lt;code&gt;ofl/quattrocentosans&lt;/code&gt; in the &lt;a href="https://github.com/google/fonts"&gt;google/fonts repo&lt;/a&gt;. The license file is named &lt;code&gt;OFL.txt&lt;/code&gt; and has copyright info for this particular font at the top.&lt;/p&gt;

&lt;p&gt;I read the license and one thing it says is this&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2) Original or Modified Versions of the Font Software may be bundled,&lt;br&gt;
redistributed and/or sold with any software, provided that each copy&lt;br&gt;
contains the above copyright notice and this license. These can be&lt;br&gt;
included either as stand-alone text files, human-readable headers or&lt;br&gt;
in the appropriate machine-readable metadata fields within text or&lt;br&gt;
binary files as long as those fields can be easily viewed by the user.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since I was going to put the font in a GitHub repo, that probably counts as redistribution, so I put a copy of the font's license file, &lt;code&gt;OFL.txt&lt;/code&gt;, in the directory with the fonts in my repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Self-Hosting Google Fonts may not be for everyone, but if you really care about a font never changing to a new version without your knowledge, then it may be the way to go. If you want to self-host Google Fonts to make your site faster, you may need to do some tests to see if it really is faster. &lt;/p&gt;

&lt;p&gt;Whatever your reason for self-hosting Google Fonts, you can download them from &lt;a href="https://google-webfonts-helper.herokuapp.com"&gt;google-webfonts-helper&lt;/a&gt; (unofficial site) and follow the steps to add them to your site. It's also a good idea to read and follow the license for the fonts used.&lt;/p&gt;

</description>
      <category>fonts</category>
      <category>googlefonts</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Demo your App in your GitHub README with an Animated GIF</title>
      <dc:creator>Kelli Blalock</dc:creator>
      <pubDate>Mon, 11 Feb 2019 00:52:51 +0000</pubDate>
      <link>https://dev.to/kelli/demo-your-app-in-your-github-readme-with-an-animated-gif-2o3c</link>
      <guid>https://dev.to/kelli/demo-your-app-in-your-github-readme-with-an-animated-gif-2o3c</guid>
      <description>&lt;p&gt;I have my GitHub link on my resume and if I'm lucky, potential employers might check out my apps on GitHub. However, I know they're busy and won't have much time to spend so I wanted to make it easy for them and others visiting my repo and show the app in action in the &lt;code&gt;README.md&lt;/code&gt; file that's displayed when you go to a repository.&lt;/p&gt;

&lt;p&gt;Embedding a video in a GitHub README would be a dream come true, but as I found out, it's not possible--you'd have to link to the video instead. You can, however put an animated GIF in a README file and that's what I've done with many of my projects. &lt;/p&gt;

&lt;p&gt;Here's one for my &lt;a href="https://github.com/kellim/farmers-market-finder" rel="noopener noreferrer"&gt;Farmer's Market Finder app&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fanbl3va8500bwbxcxqbj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fanbl3va8500bwbxcxqbj.gif" alt="App Demo" width="600" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unfortunately, animated GIFs can't normally be as long as videos, but you can use them to quickly show off some core functionality of your app.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Create an Animated GIF?
&lt;/h2&gt;

&lt;p&gt;Here are a couple apps you can use to create animated GIF screen recordings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;p&gt;I like to use &lt;a href="https://www.screentogif.com/" rel="noopener noreferrer"&gt;ScreenToGif&lt;/a&gt; which is a free open source app for Windows 7 or later. The software is intuitive to use for simply creating an animated GIF of an area you choose on your screen and they also have a &lt;a href="https://github.com/NickeManarin/ScreenToGif/wiki/help" rel="noopener noreferrer"&gt;User Guide&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mac
&lt;/h3&gt;

&lt;p&gt;I use &lt;a href="https://gifox.io/" rel="noopener noreferrer"&gt;Gifox&lt;/a&gt; when creating animated GIFs of my screen on the Mac. It sits up in my menu bar and is easy to use. I use the paid version because GIFs created with the free version are limited to 10 seconds and have a watermark. &lt;/p&gt;

&lt;h3&gt;
  
  
  Other
&lt;/h3&gt;

&lt;p&gt;I know I've left out options for other operating systems and devices, but I only wanted to recommend the ones I've tried myself. Please comment below if you can recommend other apps for taking animated GIF screen recordings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding the Animated GIF to your README
&lt;/h2&gt;

&lt;p&gt;Once you've created the animated GIF, you can embed it in your &lt;code&gt;README.md&lt;/code&gt; file like you would a regular image.&lt;/p&gt;

&lt;p&gt;I usually create a 'Demo' Heading in my README under the description of the app and put the animated GIF under the Demo heading along with a link to a demo of the site online.&lt;/p&gt;

&lt;p&gt;If you don't have a good place to host images, you could do what I have done and create a &lt;code&gt;demo&lt;/code&gt; (or better named) folder in your GitHub repository and upload the GIF there, then link to it in the README. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;![Farmers Market Finder Demo](demo/demo.gif)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note: The alt text is what goes between the square brackets and then the URL to the GIF goes between the parentheses. If the image is in your GitHub repository, you can use a relative link like I did in the example.&lt;/p&gt;

&lt;p&gt;Thanks for reading my first post! &lt;/p&gt;

</description>
      <category>readme</category>
      <category>documentation</category>
      <category>markdown</category>
      <category>github</category>
    </item>
  </channel>
</rss>
