Font Identification API
Kuzindikira mafonti kuchokera ku letterform traits kapena chithunzi, chogwirizana ndi buku laulere. Free for humans on this site - this API is for programmatic and bulk use.
Chithunzi
POST https://fonts.free/api/identify/
Modes awiri. Kutumiza Wizard yankho monga JSON, kapena chithunzi monga multipart form data. Kuwonjezera?top=N (1-48) kuti ateteze kuchuluka kwa malingana anabwerera.
1. Pogwiritsa ntchito letterform traits
curl -X POST "https://fonts.free/api/identify/?top=8" \
-H "Content-Type: application/json" \
-d '{"answers": {"serif": ["none"], "contrast": ["low"], "a": ["double"]}}'
2. Kuchokera chithunzi (beta)
curl -X POST "https://fonts.free/api/identify/" \
-F "image=@sample.png"
Python
import requests
H = {"X-Api-Key": "your_key"}
# by traits
r = requests.post("https://fonts.free/api/identify/?top=8", headers=H,
json={"answers": {"serif": ["none"], "contrast": ["low"]}})
# from an image
r = requests.post("https://fonts.free/api/identify/", headers=H,
files={"image": open("sample.png", "rb")})
for m in r.json()["matches"]:
print(m["family"], m["score"], m["url"])
Kuyankha
{
"ok": true,
"mode": "wizard",
"matches": [
{"slug": "roboto", "family": "Roboto",
"url": "https://fonts.free/fonts/roboto/",
"css": "…", "score": 3}
]
}
Kutsimikizira ndi kuletsa
Ngati simugwiritsa ntchito chida, chidacho chimagwira ntchito koma chili ndi malire a ma IP - choncho ndi bwino kuyesera. Chida chimawonjezera malire anu pa mwezi. Ikani ngati header kapena query parameter:
-H "X-Api-Key: your_key" # or ?key=your_key
Maphunziro
Sichifunikira chida chofunikira pogwiritsa ntchito magetsi. Chofunikira kwambiri kwa prototypes ndi zida zochepa.
Kwa mapulogalamu akupanga ndi kuzindikira kwa batani. Kugwirizana kwa Priority.
High-throughput kapena embedded kugwiritsa ntchito. Priority kugwirizana.
Onani maphunziro ndi kulembetsa
Mtengo wopanda ndalama sifunikanso chida - funsani malo omaliza, ndi otsika mtengo pa IP. Kulembetsa patsamba lolipira kuti mupange chida ndi ndalama zowonjezera pamwezi. Kawirikawiri, API imabwerera ndi font yopanda ndalama, yokhala ndi chilolezo chotsegulira, kotero palibe chomwe chimafunikira chilolezo.