← 返回
未分类 中文

Google Web Fonts

Use the Google Fonts API to add fonts to web pages.
使用 Google Fonts API 为网页添加字体
openlark openlark 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 288
下载
💾 0
安装
1
版本
#latest

概述

Google Web Fonts

Use Cases

  • Importing Google Fonts in HTML
  • Building font CSS URLs (family, style, weight, subset, text parameters)
  • Controlling font loading behavior with font-display
  • Applying font effects (Beta)

Quick Start

1. Include the Font Stylesheet

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Font+Name">

2. Use the Font in CSS

body {
  font-family: 'Font Name', serif;
}

Building API Parameters

Basic Format

https://fonts.googleapis.com/css?family=Font+Name

Multiple Fonts (separated by |)

https://fonts.googleapis.com/css?family=Tangerine|Inconsolata|Droid+Sans

Styles and Weights (separated by :)

StyleSpecifier
------------------
Italicitalic or i
Boldbold or b, or numeric value such as 700
Bold Italicbolditalic or bi

Example:

https://fonts.googleapis.com/css?family=Cantarell:italic|Droid+Serif:bold

font-display Control

https://fonts.googleapis.com/css?family=Roboto&display=swap

Subsets (subset parameter)

https://fonts.googleapis.com/css?family=Roboto+Mono&subset=cyrillic,greek

Performance Optimization (text parameter)

Specify the characters needed to reduce the font file size by up to 90%:

https://fonts.googleapis.com/css?family=Inconsolata&text=Hello%20World

Font Effects (Beta)

https://fonts.googleapis.com/css?family=Rancho&effect=shadow-multiple

Usage:

<div class="font-effect-shadow-multiple">This is a font effect!</div>

Common Effects List

EffectAPI NameClass Name
------------------------------
3D3dfont-effect-3d
3D Float3d-floatfont-effect-3d-float
Anaglyphanaglyphfont-effect-anaglyph
Neonneonfont-effect-neon
Shadow Multipleshadow-multiplefont-effect-shadow-multiple
Vintagevintagefont-effect-vintage

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 02:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Toutiao Graphic Publisher

openlark
通过浏览器自动化在头条发布图文内容,支持智能排版、自动生成热门标签等功能。
★ 2 📥 1,008
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 182,169
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,802