diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-06-03 12:32:29 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-06-03 12:32:29 -0700 |
commit | d1f071bf9aa394525745f0b4f582f97112ece26e (patch) | |
tree | 1395695a314a75972476a37ba8ea45cd9efea2f9 /include/libfont.h | |
parent | 2b15821a6524b5a5231b97d5d4c0cb5a459711e8 (diff) |
checkin: before attempting hinting engine
Diffstat (limited to 'include/libfont.h')
-rw-r--r-- | include/libfont.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/libfont.h b/include/libfont.h index 860d8d4..42d160a 100644 --- a/include/libfont.h +++ b/include/libfont.h @@ -174,28 +174,27 @@ void font·freebitmap(font·Info *info, uchar *bitmap); uchar *font·code_makebitmap(font·Info *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff); /* - * the same as font·GetCodepoitnBitmap, but you can specify a subpixel - * shift for the character + * the same as font·code_makebitmap, but you can specify a subpixel shift for the character */ uchar *font·code_makebitmap_subpixel(font·Info *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff); /* * the same as font·codepointbitmap, but you pass in storage for the bitmap * in the form of 'output', with row spacing of 'out_stride' bytes. the bitmap - * is clipped to out_w/out_h bytes. Call font·codepointbitmapbox to get the + * is clipped to out_w/out_h bytes. Call font·codepointbbox to get the * width and height and positioning info for it first. */ void font·code_fillbitmap(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint); /* - * same as font·MakeCodepointBitmap, but you can specify a subpixel - * shift for the character + * same as font·code_fillbitmap, but you can specify a subpixel shift for the character */ void font·code_fillbitmap_subpixel(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint); /* - * same as font·MakeCodepointBitmapSubpixel, but prefiltering - * is performed (see font·PackSetOversampling) + * same as font·fillbitmap_subpixel, but prefiltering is performed + * oversampling a font increases the quality by allowing higher-quality subpixel + * positioning, and is especially valuable at smaller text sizes. */ void font·code_fillbitmap_subpixel_prefilter(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint); @@ -206,13 +205,13 @@ void font·code_fillbitmap_subpixel_prefilter(font·Info *info, uchar *output, i * (Note that the bitmap uses y-increases-down, but the shape uses * y-increases-up, so CodepointBitmapBox and CodepointBox are inverted.) */ -void font·code_bitmapbox(font·Info *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); +void font·code_bbox(font·Info *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); /* * same as font·GetCodepointBitmapBox, but you can specify a subpixel * shift for the character */ -void font·code_bitmapbox_subpixel(font·Info *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); +void font·code_bbox_subpixel(font·Info *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); /* * the following functions are equivalent to the above functions, but operate @@ -223,8 +222,8 @@ uchar *font·glyph_makebitmap_subpixel(font·Info *info, float scale_x, float sc void font·glyph_fillbitmap(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph); void font·glyph_fillbitmap_subpixel(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph); void font·glyph_fillbitmap_subpixel_prefilter(font·Info *info, uchar *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int glyph); -void font·glyph_bitmapbox(font·Info *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); -void font·glyph_bitmapbox_subpixel(font·Info *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); +void font·glyph_bbox(font·Info *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); +void font·glyph_bbox_subpixel(font·Info *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); /* signed distance function (or field) rendering */ |