Repository navigation
forme 0.8.0
Three additions for setting Word documents and old bitmap fonts, from #909 to #911: a face's Windows line metrics, a placement for each line's text within its line box, and the monochrome and greyscale bitmap strikes of a face with no outlines.
Descriptor states usWinAscent and usWinDescent (#910, #912)
WinAscentandWinDescentare OS/2'susWinAscentandusWinDescent, in font units and both positive, withMetricWinMetricssaying the font states them.- Word sets a single-spaced line by them:
WinAscent + WinDescenttall, its baselineWinAscentbelow the top. - An instance has them as MVAR's
hclaandhcldmove them, checked against HarfBuzz at every location.
Per-line placement of a line's text (#911, #913)
-
-forme-line-placement: auto | top | bottom | <number [0,1]> | <percentage>, which is not CSS, moves each line's baseline within a line box whose height CSS decided:value baseline Word line rule autoCSS half-leading — tophighest content-area top at the line box's top multiple bottomlowest content-area bottom at the line box's bottom at least 0.8/80%0.8 of the line box's height down exactly -
It is applied per line, so a paragraph of mixed sizes is placed by each line's own tallest text. It inherits and is read from the block; a line set down the page is left in the middle.
-
paragraph.LinePlacementandStrut.Placementcarry it.
A face with no outlines is painted from its bitmap strikes (#909, #914)
- EBDT and Apple's bdat: EBLC/bloc index formats 1–5, image formats 1, 2, 5, 6 and 7, composites in formats 8 and 9, bit depths 1, 2, 4 and 8. An Apple bitmap-only font (bloc and bdat under a
bhed) now loads, where it was refused. A face with outlines is still drawn from them, whatever strikes it carries. ImageMaskis such a glyph's image: a byte of coverage a pixel, painted inImage.Color, the foreground.ColourMaskisGlyphColour's answer for it.Image.Exactsays a bitmap glyph's strike is the size asked for, for EBDT, CBDT and sbix alike, so a caller drawing only exact bitmaps can tell.- Every glyph of every strike of two faces built for it matches FreeType 2.14, and reading each glyph is bounded by a work budget.