From owner-freebsd-gnome@freebsd.org Sat Jul 1 07:43:25 2017 Return-Path: Delivered-To: freebsd-gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7BDDD9DAC7 for ; Sat, 1 Jul 2017 07:43:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id CD3977D0A2 for ; Sat, 1 Jul 2017 07:43:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C96CCD9DAC6; Sat, 1 Jul 2017 07:43:25 +0000 (UTC) Delivered-To: gnome@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C913DD9DAC5 for ; Sat, 1 Jul 2017 07:43:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFA387D0A1 for ; Sat, 1 Jul 2017 07:43:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v617hPj3061872 for ; Sat, 1 Jul 2017 07:43:25 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 219608] print/freetype2 produces incorrect line spacing for some fonts Date: Sat, 01 Jul 2017 07:43:25 +0000 X-Bugzilla-Reason: CC AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lightside@gmx.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: gnome@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 07:43:26 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219608 lightside changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183237|0 |1 is obsolete| | Attachment #183327|0 |1 is obsolete| | --- Comment #24 from lightside --- Created attachment 183976 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D183976&action= =3Dedit Some files/patch-fix_size_metrics.diff patch for test (for v2.8) Sorry for the delay. Some time was needed to create automated testing environment for using with "git bisect run". The new git bisect showed following commit (based on some output from DejaVu Sans Mono Book 14 font): http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3D8ab08c= ff63eeb23b6c9f2c4470ae9809f2acf244 -8<-- # bad: [a12a34451a99cbbcad55d466940fd445171927fd] * Version 2.8 released. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # good: [069083cccd73d1d68da68116c8d050bb62cdfe0e] * Version 2.7.1 released. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D git bisect start 'VER-2-8' 'VER-2-7-1' '--' # bad: [c1b000da00c747cb46fd4c95ca83bee802d35487] [sfnt] Remove redundant c= ode. git bisect bad c1b000da00c747cb46fd4c95ca83bee802d35487 # bad: [f4e569664332b30eca48643ed5194d0da91b0560] [sfnt] s/TT_NameEntry/TT_Name/. git bisect bad f4e569664332b30eca48643ed5194d0da91b0560 # good: [7ccca6aec167c2c30c569765ece808f0eee023a6] [pcf] Disable long family names by default. git bisect good 7ccca6aec167c2c30c569765ece808f0eee023a6 # bad: [8013d89f7fe7da123e3cd5708e501caf88405226] ftsnames.h, ttnameid.h, tttables.h: Revise documentation. git bisect bad 8013d89f7fe7da123e3cd5708e501caf88405226 # bad: [56645f8a8ba0a08ed2bd383b5a1558e5c790bf74] Fix documentation of `FT_Get_Sfnt_Name'. git bisect bad 56645f8a8ba0a08ed2bd383b5a1558e5c790bf74 # bad: [d718ac4ead0d711bd73d8103ba67cca10a55b3d9] [truetype] Provide metrics variation service. git bisect bad d718ac4ead0d711bd73d8103ba67cca10a55b3d9 # bad: [07ee1d250c5ae008e3467dea39dfc0b7f99af0b3] [truetype] Parse `MVAR' table. git bisect bad 07ee1d250c5ae008e3467dea39dfc0b7f99af0b3 # bad: [8ab08cff63eeb23b6c9f2c4470ae9809f2acf244] [truetype] More preparati= ons for MVAR support. git bisect bad 8ab08cff63eeb23b6c9f2c4470ae9809f2acf244 # first bad commit: [8ab08cff63eeb23b6c9f2c4470ae9809f2acf244] [truetype] M= ore preparations for MVAR support. -->8- I attached new patch, which fixes this. Also I created following application to get some related information for specified font (similar to what in http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/base/ftobj= s.c?h=3DVER-2-8#n3076 and some from ftdump, but with ability to specify dpi): -8<-- font_info #include #include FT_FREETYPE_H FT_Error font_info(FT_Library ft, const char *font, const long dpi, const l= ong size) { FT_Error error; FT_Face face; error =3D FT_New_Face(ft, font, 0, &face); if (error) { fprintf(stderr, "Unable to load font: %s\n", font); return error; } // Set size in pixels //error =3D FT_Set_Pixel_Sizes(face, 0, size); error =3D FT_Set_Char_Size(face, size * 64, size * 64, dpi, dpi); if (error) { fprintf(stderr, "Unable to set font size for: %s\n", font); } else { printf("font: %s\nstyle: %s\ndpi: %ld\nsize: %ld\n", \ face->family_name, face->style_name, dpi, size); //if (FT_IS_SCALABLE(face)) printf("Face:\n" " ascender: %f\n" \ " descender: %f\n" \ " height: %f\n", face->ascender / 64.0, face->descender / 64.0, face->height / 64.0 ); FT_Size_Metrics *metrics =3D &face->size->metrics; printf("Size metrics:\n" \ " ascender: %f\n" \ " descender: %f\n" \ " height: %f\n" \ " max advance: %f\n" \ " x scale: %ld (%f)\n" \ " y scale: %ld (%f)\n" \ " x ppem: %d\n" \ " y ppem: %d\n", metrics->ascender / 64.0, metrics->descender / 64.0, metrics->height / 64.0, metrics->max_advance / 64.0, metrics->x_scale, metrics->x_scale / 65536.0, metrics->y_scale, metrics->y_scale / 65536.0, metrics->x_ppem, metrics->y_ppem ); } FT_Done_Face(face); return error; } int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Usage: %s [-v] [-d dpi] [-s size] path_to_font\n", argv[0]); return 1; } const char *font =3D NULL; long dpi =3D 72, size =3D 10; int verbose =3D 0; for (int i =3D 1; i < argc; ++i) { if (argv[i][0] =3D=3D '-') switch (argv[i][1]) { case 'd': { if (i + 1 < argc) { //dpi =3D atoi(argv[++i]); dpi =3D strtol(argv[++i], NULL, 10); } else { fprintf(stderr, "Specify dpi for the font\n"); return 1; } break; } case 's': { if (i + 1 < argc) { //size =3D atoi(argv[++i]); size =3D strtol(argv[++i], NULL, 10= ); } else { fprintf(stderr, "Specify size (in pixels) for the font\n"); return 1; } break; } case 'v': { verbose =3D 1; break; } } else { font =3D argv[i]; } } if (font =3D=3D NULL) { fprintf(stderr, "Specify path to the font\n"); return 1; } if (verbose) printf("path: %s\n", font); FT_Error error; FT_Library ft; error =3D FT_Init_FreeType(&ft); if (error) { fprintf(stderr, "Unable to initialize FreeType\n"); return 1; } error =3D font_info(ft, font, dpi, size); if (error) return 1; FT_Done_FreeType(ft); return 0; } -->8- --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=