360 Secure SkillHub
360 安全技能中心

Google Web Fonts

核心功能是生成带各类参数的字体CSS URL,支持多字体组合、样式权重设置、子集筛选、指定文本优化体积、控制字体加载行为及应用Beta字体效果。典型场景为网页开发中引入自定义字体,输入字体名称及配置参数,输出对应CSS链接和使用代码示例,帮助开发者快速嵌入字体并优化加载性能。

openlark
openlark
热度 40.50
最近更新 2026-05-11 17:47:22
分类:开发依赖:纯提示词应用场景:API 集成 / 代码生成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add google-web-fonts
Metadata
name
google-web-fonts
description
Use the Google Fonts API to add fonts to web pages.

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 :)

Style Specifier
Italic italic or i
Bold bold or b, or numeric value such as 700
Bold Italic bolditalic 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

Effect API Name Class Name
3D 3d font-effect-3d
3D Float 3d-float font-effect-3d-float
Anaglyph anaglyph font-effect-anaglyph
Neon neon font-effect-neon
Shadow Multiple shadow-multiple font-effect-shadow-multiple
Vintage vintage font-effect-vintage