Age | Commit message (Collapse) | Author |
|
Before version 1.49.3 the pango was using (probably) values from BLC
table, since 1.49.3 pango uses harfbuzz for metrics and it seems
harfbuzz is using OS2 table. Result is font with 1px extra for
ascend/descent.
Solution seems to be to use FONT_UNITS_FLOOR instead of FONT_UNITS_CEIL
when storing file.
Fixes: #7
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/18>
|
|
https://docs.microsoft.com/en-us/typography/opentype/spec/cmap defines
`entrySelector` as "Log2 of the maximum power of 2 less than or equal to
numTables (log2(searchRange/2), which is equal to floor(log2(segCount)))"
Part-of: <https://gitlab.freedesktop.org/xorg/app/fonttosfnt/-/merge_requests/17>
|
|
If it was defined, it would try to include a snprintf.c file that's
not actually in our source tree.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by cppcheck
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Uses ci-fairy from freedesktop/ci-templates
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
|
|
|
|
Fixes a coverity warning: ftell may return -1 on error which we then pass into
fseek later. We properly fail there anyway, so this change is unlikely to have
any real effect.
|
|
|
|
Resolves issues found by Oracle Parfait 4.0 static analyser:
File Leak [file-ptr-leak]:
Leaked File out
at line 337 of app/fonttosfnt/write.c in function 'writeFile'.
out initialized at line 330 with fopen
File Leak [file-ptr-leak]:
Leaked File out
at line 366 of app/fonttosfnt/write.c in function 'writeFile'.
out initialized at line 330 with fopen
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
|
|
I discovered this bug when converting the Tamsyn font from pcf to otb.
|
|
to fix a segfault
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this was an attempt to fix linespacing, which did not help, but
would still keep it around to avoid double efforts.
|
|
This will probably not work for a font providing multiple strikes.
But .bdf fonts don't provide multiple strikes (or do they?!?)
I don't know about .pcf fonts, but I would recommend against running fonttosfnt
on .pcf fonts because bdf2pcf seems to loose some attributes during conversion.
|
|
|
|
|
|
|
|
Honestly I have no idea why the foundry needs to fit in four bytes.
But anyway truncation might indeed be better then "UNKN" ?
Anyone more knowledgeable than me out there?
|
|
According to
https://simoncozens.github.io/fonts-and-layout/opentype.html#vertical-metrics-hhea-and-os2
sTypoDescender should be negative and lineGap should be zero.
|
|
This caused pango to calculate wrong, too large font extents and in
consequence gvim used too large character cells.
|
|
X Logical Font Description recognize "Medium" as "Regular".
Update the faceWeight function to change style from "Medium" to "Regular".
|
|
If macTime() fails write zeros instead of unitialized memory to
the date fields.
|
|
mktime() and time() return (time_t -1) to signal an error.
Checking for negative values will incorrectly assume an error
happened for any calendar date before the unix epoch.
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This makes it easier to transition from bdftopcf.
Although an OTB file could include fonts from multiple BDF sources, that
functionality is not currently implemented for fonts read from stdin.
Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
|
|
The OTB (OpenType Bitmap) extension has found some traction, so suggest
that.
Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
|
|
Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
|
|
Some fonts have a ppem value like 11.9, this patch adds integer rounding to
convert those ppem value to 12 instead of 11.
|
|
Allow for BDF file with no specified encoding to be read as Adobe
Standard (per freetype's BDF driver), and handle any Unicode-equivalent
encoding without changing the encoding name.
|
|
https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_encoding
indicates that ISO-8859-1 is automatically mapped to Unicode for BDF and
PCF fonts -- trying to use FT_Select_Charmap() with FT_ENCODING_NONE
leads to an error for such fonts.
|
|
Freetype uses NULL to represent an empty string when retrieving a BDF
property -- check for this in addition to an actual error
|