google_font_url 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +20 -5
- data/google_font_url.gemspec +2 -1
- data/lib/google_font_url/version.rb +1 -1
- data/lib/google_font_url.rb +3 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2360e5f172eb1f8c4bceab598e68a5423fe5b5f61aa6c7aa217e5c3ea74c32bc
|
|
4
|
+
data.tar.gz: 894820aef45224431dfbab2caa47889d9df83496210fe3e60777291f99accad8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 837efbc84f0510931000852e411833d57f409120397a152ed38a8131cd5a0fb18e53e1f24606d3cb2eef3defec631af231cd83a00233a6db4e408a48b6e97275
|
|
7
|
+
data.tar.gz: 83bb60143be90f3c3b67941bde55ba4671e8222d75653dc5e8d96371e345436f75b0b2176efb74c3295a473f912d7962eccfc89cf95021a32b98b5775bbf1cd6
|
data/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Google Font Url Extractor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
To make all available Google Fonts selectable in a Rails application and save their corresponding CSS links, follow these steps:
|
|
4
4
|
|
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `
|
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `require 'google_font_url/generator'`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`Use in class: require 'google_font_url/generator'` .
|
|
10
10
|
|
|
11
11
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
12
|
|
|
@@ -17,7 +17,22 @@ gem 'google_font_url'
|
|
|
17
17
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
|
|
20
|
+
GoogleFontUrl::Generator.generate
|
|
21
|
+
[["ABeeZee", "https://fonts.googleapis.com/css2?family=ABeeZee:ital,wght@0,400;1,400&display=swap"],
|
|
22
|
+
["ADLaM Display", "https://fonts.googleapis.com/css2?family=ADLaM+Display:wght@400&display=swap"],.....
|
|
23
|
+
```
|
|
24
|
+
```bash
|
|
25
|
+
GoogleFontUrl::Generator.all
|
|
26
|
+
[{"family"=>"ABeeZee",
|
|
27
|
+
"variants"=>["regular", "italic"],
|
|
28
|
+
"subsets"=>["latin", "latin-ext"],
|
|
29
|
+
"version"=>"v22",
|
|
30
|
+
"lastModified"=>"2024-09-04",
|
|
31
|
+
"files"=>{"regular"=>"https://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN6tKukbcHCpE.ttf", "italic"=>"https://fonts.gstatic.com/s/abeezee/v22/esDT31xSG-6AGleN2tCklZUCGpG-GQ.ttf"},
|
|
32
|
+
"category"=>"sans-serif",
|
|
33
|
+
"kind"=>"webfonts#webfont",
|
|
34
|
+
"menu"=>"https://fonts.gstatic.com/s/abeezee/v22/esDR31xSG-6AGleN2tOklQ.ttf",
|
|
35
|
+
"css_style_link"=>"https://fonts.googleapis.com/css2?family=ABeeZee:ital,wght@0,400;1,400&display=swap"},.....
|
|
21
36
|
```
|
|
22
37
|
|
|
23
38
|
## Usage
|
data/google_font_url.gemspec
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "lib/google_font_url/version"
|
|
4
|
+
require_relative "lib/google_font_url/generator"
|
|
4
5
|
|
|
5
6
|
Gem::Specification.new do |spec|
|
|
6
7
|
spec.name = "google_font_url"
|
|
@@ -9,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
9
10
|
spec.authors = ["mrmalvi"]
|
|
10
11
|
spec.email = ["malviyak00@gmail.com"]
|
|
11
12
|
spec.summary = "A gem to generate Google Fonts URLs dynamically." # Short summary
|
|
12
|
-
spec.description
|
|
13
|
+
spec.description = "This gem provides a simple way to generate Google Fonts URLs with custom font names, weights, and variants. It supports embedding fonts into your web projects effortlessly by generating URLs or complete CSS links, ensuring compatibility with all font styles and weights available in the Google Fonts library."
|
|
13
14
|
spec.homepage = "https://github.com/mrmalvi/google_font_url"
|
|
14
15
|
spec.required_ruby_version = ">= 3.0.0"
|
|
15
16
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_font_url
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mrmalvi
|
|
@@ -67,7 +67,9 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0.18'
|
|
69
69
|
description: This gem provides a simple way to generate Google Fonts URLs with custom
|
|
70
|
-
font names and
|
|
70
|
+
font names, weights, and variants. It supports embedding fonts into your web projects
|
|
71
|
+
effortlessly by generating URLs or complete CSS links, ensuring compatibility with
|
|
72
|
+
all font styles and weights available in the Google Fonts library.
|
|
71
73
|
email:
|
|
72
74
|
- malviyak00@gmail.com
|
|
73
75
|
executables: []
|
|
@@ -82,6 +84,7 @@ files:
|
|
|
82
84
|
- bin/setup
|
|
83
85
|
- data/fonts_data.yml
|
|
84
86
|
- google_font_url.gemspec
|
|
87
|
+
- lib/google_font_url.rb
|
|
85
88
|
- lib/google_font_url/generator.rb
|
|
86
89
|
- lib/google_font_url/utils.rb
|
|
87
90
|
- lib/google_font_url/version.rb
|