Tüm sürümler v0.1.3415 Eki 2026Görüntü oluşturma, Web API’leri ve DOM Akış

Sürüm notları İngilizce yazılmıştır.

Canvas text measured and drawn like the reference browser, and SVG shapes you can measure

Charts drawn on a canvas size their labels with measureText, and Floati answered with a rough guess of half a character's height per letter. It now measures with the same fonts it paints with, so widths match the reference browser to the hundredth of a pixel, and bold and italic canvas text really is bold and italic. SVG gains its geometry: bounding boxes, transform matrices, path lengths, points along a path and hit tests, checked on 1,740 generated cases every build.

equal to the reference browserText widths
16 / 17 + 1 exactChecks vs the reference browser
Öne çıkanlar2

Canvas charts that fit their labels

ÖnceSonra
Önce: a canvas bar chart sized with measureText
Önce
Sonra: a canvas bar chart sized with measureText
Sonra · v0.1.341
Referans tarayıcıda aynı sayfa
Referans tarayıcı

This is a canvas chart laid out the way Chart.js and most canvas chart kits do it: each value badge is sized to its text with measureText, and the title and badges are bold. Floati guessed text widths and drew bold text in the regular face, so badges came out the wrong size and nothing was bold. It now measures and draws with the real faces, bold and italic included, and matches the reference browser.

a canvas bar chart sized with measureText

Text widthsequal to the reference browserBold, italicreal faces

SVG shapes you can measure

1,740generated geometry cases checked every build

Diagram editors, map widgets and animated line drawings ask SVG where things are: a shape's bounding box, the matrix that places it on screen, how long a path is and where a point along it falls. These now all work, matching the reference browser on 16 of 17 checks. On the 17th Floati is more exact than the reference browser: the reference browser measures circles and arcs with a coarse approximation and reads a circle of radius 10 as 62.43 long instead of 2 pi r, 62.83.

Checks vs the reference browser16 / 17 + 1 exactBroken versions caught2 of 2

Neler değişti

6 değişiklik
  1. Görüntü oluşturmaCanvas measureText measures with the fonts the canvas draws with: widths, the font's ascent and descent, and the ink box of the text match the reference browser to the hundredth of a pixel. It used to guess half a character height per letter, so charts sized and centred their labels around widths up to a fifth off. Measuring learns nothing about your computer: font names resolve through Floati's fixed table, never through the fonts you have installed.
  2. Görüntü oluşturmaCanvas text honours font weight and style: bold and italic labels use the bold and italic faces, both when measured and when drawn. SVG text honours font-weight and font-style too.
  3. Görüntü oluşturmaThe canvas font setting reads the whole CSS font shorthand: sizes in px, pt, em, rem and percent, weight and style keywords, and a line height.
  4. Web API’leri ve DOMSVG geometry arrives: getBBox (tight around curves and arcs, and around a group's transformed children), getCTM and getScreenCTM through nested transforms and view boxes, nearestViewportElement, farthestViewportElement and ownerSVGElement, getTotalLength and getPointAtLength, and isPointInFill and isPointInStroke. 16 of 17 checks match the reference browser; on the 17th Floati measures arcs exactly where the reference browser approximates them.
  5. Görüntü oluşturmaProven on every build: 1,740 generated shapes and paths check exact perimeters, that a path written with relative commands measures the same as written absolute, that every point along a path stays inside its box and the path reaches all four sides, and that each matrix is the product of its transforms. Two deliberately broken versions were each caught.
  6. Web API’leri ve DOMPages that animate along a path call getPointAtLength on every frame: the outline of each shape is worked out once and reused until its attributes change.

Tarayıcınızda deneyin

Her denetim, okuduğunuz tarayıcıda canlı çalışır. Hiçbir yere bir şey gönderilmez.

Kontrol etTarayıcınızFloati
Canvas measureText uses the real font (bold is wider than regular)DenetleniyorEvet
SVG bounding boxes (getBBox)DenetleniyorEvet
SVG path lengths (getTotalLength)DenetleniyorEvet
Points along a path (getPointAtLength)DenetleniyorEvet
SVG transform matrices (getCTM)DenetleniyorEvet
SVG hit testing (isPointInFill)DenetleniyorEvet
Geçti 6 / 6
v0.1.341 sürümünden bu yana her şey tek yerde

Sürümler

v0.1.0 - 0.1.9 · 10 Tem 2026418v0.1.427 · 25 Kas 2026