summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-02-15unifdef NEED_SNPRINTFHEADmasterAlan Coopersmith1-6/+0
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>
2024-02-15unifdef __SCO__Alan Coopersmith1-5/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-15unifdef __UNIXOS2__Alan Coopersmith1-5/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-09-27fonttosfnt 1.2.3fonttosfnt-1.2.3Alan Coopersmith1-1/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01Use C99 compound literals to initialize newly allocated structsAlan Coopersmith1-66/+79
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01Allow inlining makeNameAlan Coopersmith2-7/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01Remove unused function findIndexAlan Coopersmith2-16/+0
Found by cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01makeBitmap: declare raster parameter const as recommended by cppcheckAlan Coopersmith2-2/+3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01args_copy variable is unused if HAVE_DECL_VA_COPY is not definedAlan Coopersmith1-0/+2
Found by cppcheck Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-04-01Variable scope reductions as recommended by cppcheckAlan Coopersmith4-65/+48
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-23gitlab CI: enable gitlab's builtin static analysisAlan Coopersmith1-0/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-23gitlab CI: enable commit & merge request checksAlan Coopersmith1-0/+49
Uses ci-fairy from freedesktop/ci-templates Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03Build xz tarballs instead of bzip2Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-08-23Add CI testsPeng Wu1-0/+47
2021-06-15Bump to 1.2.2fonttosfnt-1.2.2Peter Hutterer1-2/+2
2021-06-141em is font size, not heightChristopher Zimmermann1-16/+15
2021-05-25Fail if ftell failsPeter Hutterer1-0/+4
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.
2020-12-16Bump to 1.2.1fonttosfnt-1.2.1Peter Hutterer1-2/+2
2020-10-31writeFile: avoid file leak on errorsAlan Coopersmith1-2/+3
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>
2020-10-26Fall back to using FONT property as family nameChristopher Zimmermann3-24/+43
2020-10-24fix sign of calculated descentChristopher Zimmermann1-1/+1
I discovered this bug when converting the Tamsyn font from pcf to otb.
2020-10-23handle empty foundry encoded as NULLChristopher Zimmermann1-2/+8
to fix a segfault
2020-10-23remove leftover debug printfChristopher Zimmermann1-2/+0
2020-10-21Bump to 1.2.0fonttosfnt-1.2.0Peter Hutterer1-1/+1
2020-09-22use PIXEL_SIZE to calculate lineGapChristopher Zimmermann3-4/+14
2020-09-22fix sign of sTypoDescenderChristopher Zimmermann1-3/+3
2020-09-22calculate capHeight and xHeight as recommendedChristopher Zimmermann1-13/+13
2020-09-22move metrics calculation to write.cChristopher Zimmermann3-92/+106
2020-09-22Add warnings when wrapping multiple fonts and on PCF fontsChristopher Zimmermann2-1/+17
2020-09-22provide version 5 OS/2 tableChristopher Zimmermann1-3/+18
this was an attempt to fix linespacing, which did not help, but would still keep it around to avoid double efforts.
2020-09-22use design metrics in eblc instead of calculated metricsChristopher Zimmermann3-50/+19
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.
2020-09-22use more properties according to XLFDChristopher Zimmermann5-71/+176
2020-09-22use standard C rounding functionsChristopher Zimmermann1-6/+5
2020-09-22correctly set OS2 fsSelection for italic and bold fontsChristopher Zimmermann1-1/+8
2020-09-22truncate foundry if there is no known abbreviation.Christopher Zimmermann1-2/+5
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?
2020-09-22use zero lineGap, sTypoDescender should be negativeChristopher Zimmermann1-4/+3
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.
2020-09-22don't add arbitrary number to the glypth metricsChristopher Zimmermann1-7/+3
This caused pango to calculate wrong, too large font extents and in consequence gvim used too large character cells.
2020-06-11Guess Regular style for Medium WeightPeng Wu1-3/+3
X Logical Font Description recognize "Medium" as "Regular". Update the faceWeight function to change style from "Medium" to "Regular".
2020-02-07Fix uninitialised memory writernhmjoj1-2/+2
If macTime() fails write zeros instead of unitialized memory to the date fields.
2020-02-07Fix incorrect error handling in macTime()rnhmjoj1-2/+2
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.
2020-01-06Bump to 1.1.0fonttosfnt-1.1.0Peter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-25Accept a BDF font on stdinJouke Witteveen3-8/+68
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>
2019-12-25Mention .otb as an extensionJouke Witteveen2-3/+3
The OTB (OpenType Bitmap) extension has found some traction, so suggest that. Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
2019-12-25Correct a string literalJouke Witteveen1-1/+1
Signed-off-by: Jouke Witteveen <j.witteveen@gmail.com>
2019-12-05Round font size to integer value when reading bitmap fontPeng Wu1-6/+6
Some fonts have a ppem value like 11.9, this patch adds integer rounding to convert those ppem value to 12 instead of 11.
2019-12-04allow ISO-646.1991-IRV as well, adobe standard for bdfRyan Farley1-6/+20
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.
2019-12-04let freetype handle ISO-8859-1 mappingRyan Farley1-1/+4
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.
2019-08-30check for freetype NULL atomsRyan Farley1-8/+10
Freetype uses NULL to represent an empty string when retrieving a BDF property -- check for this in addition to an actual error
2019-01-10Avoid undefined behaviourMaya Rashish1-2/+2
Left shifting a negative is undefined. For consistency, use the equivalent form of multiplication for the positive numbers as well.
2018-11-21Update configure.ac bug URL for gitlab migrationAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>