[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

            Bug ID: 227761
           Summary: print/freetype2: Fonts aren't correctly rendered with
                    2.9
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: [hidden email]
          Reporter: [hidden email]
             Flags: maintainer-feedback?([hidden email])
          Assignee: [hidden email]

Hi

Since the update to freetype2 2.9 (from 2.8.1) we're not able to render the
embedded pdf fonts correctly to a jpg. We're using imagemagick for rendering
but even tried ghostscript with the same result.

The developers think it's not a fault of freetype because they can't reproduce
it. Could it be a problem related to the FreeBSD port?

Here's the link to the bugtracking of freetype (including a pdf for testing):
https://savannah.nongnu.org/bugs/?53739#postcomment

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

maintainer-feedback requested: [Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
Bugzilla Automation <[hidden email]> has asked freebsd-gnome mailing list
<[hidden email]> for maintainer-feedback:
Bug 227761: print/freetype2: Fonts aren't correctly rendered with 2.9
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761



--- Description ---
Hi

Since the update to freetype2 2.9 (from 2.8.1) we're not able to render the
embedded pdf fonts correctly to a jpg. We're using imagemagick for rendering
but even tried ghostscript with the same result.

The developers think it's not a fault of freetype because they can't reproduce
it. Could it be a problem related to the FreeBSD port?

Here's the link to the bugtracking of freetype (including a pdf for testing):
https://savannah.nongnu.org/bugs/?53739#postcomment
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

Dani <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
              Flags|                            |maintainer-feedback?(bapt@F
                   |                            |reeBSD.org)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #1 from Dani <[hidden email]> ---
Any news on this? :)

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

Baptiste Daroussin <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress

--- Comment #2 from Baptiste Daroussin <[hidden email]> ---
I can reproduce for sure, but I am not sure how to debug that :(

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from lightside <[hidden email]> ---
Hello.

(In reply to Baptiste Daroussin from comment #2)
> I can reproduce for sure, but I am not sure how to debug that :(
I think, possible to compare checksums for generated image with using
(expected) checksum value from FreeType 2.8 version (built with using (almost)
the same options) to identify related change(s) (and/or Git commit):
% make clean build
% cd work/*
% env LD_PRELOAD=./objs/.libs/libfreetype.so convert -append path/to/file.pdf
image.jpg
% sha256 -q image.jpg
<..>

I slightly modified testing environment for freetype2, which I introduced in
bug 219608 comment #27.
The (automated) git bisect have found following commit:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=75cb071b3fbfa2315c5d458fee2bb465a14568ae
-8<--
# bad: [86bc8a95056c97a810986434a3f268cbe67f2902] * Version 2.9.1 released.
=========================
# good: [a12a34451a99cbbcad55d466940fd445171927fd] * Version 2.8 released.
=======================
git bisect start 'VER-2-9-1' 'VER-2-8' '--'
# bad: [2f0e11406890cbd15d86f8e75ab6ab4da8898af4] Add tracing for hints.
git bisect bad 2f0e11406890cbd15d86f8e75ab6ab4da8898af4
# bad: [f53ccf6f8f3d1c5c717b0edd0529ef677c981f22] Minor comment fix.
git bisect bad f53ccf6f8f3d1c5c717b0edd0529ef677c981f22
# good: [79e3789f81e14266578e71196ce71ecf5381d142] * src/winfonts/winfnt.c
(FNT_Face_Init): Don't set active encoding.
git bisect good 79e3789f81e14266578e71196ce71ecf5381d142
# bad: [229a5535b53b308a8edda894fe112517c6d03b00] CHANGES: Add information on
global metrics rounding.
git bisect bad 229a5535b53b308a8edda894fe112517c6d03b00
# bad: [2e7bb5e825880301e762f41fd0efa2aa18a4421f] * src/cff/cffparse.c
(do_fixed): Fix typo.
git bisect bad 2e7bb5e825880301e762f41fd0efa2aa18a4421f
# good: [c8829e4bc18c99b8cc0f747216c2191ec669e11a] Fix pkg-config in
freetype-config for cross-compiling (#51274).
git bisect good c8829e4bc18c99b8cc0f747216c2191ec669e11a
# bad: [298e2ea5a6c2e3264f8abaa8b1d2371fb4c77f4d] [cff, truetype] Integer
overflows.
git bisect bad 298e2ea5a6c2e3264f8abaa8b1d2371fb4c77f4d
# bad: [75cb071b3fbfa2315c5d458fee2bb465a14568ae] [sfnt] Synthesize a Unicode
charmap if one is missing.
git bisect bad 75cb071b3fbfa2315c5d458fee2bb465a14568ae
# good: [390048fa468dfee06f722da6b8ca1b79022480d6] Remove deprecated comment.
git bisect good 390048fa468dfee06f722da6b8ca1b79022480d6
# first bad commit: [75cb071b3fbfa2315c5d458fee2bb465a14568ae] [sfnt]
Synthesize a Unicode charmap if one is missing.
-->8-

The changes in 75cb071b3fbfa2315c5d458fee2bb465a14568ae commit mentions about
FT_CONFIG_OPTION_POSTSCRIPT_NAMES define:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h?h=VER-2-9-1#n290
-8<--
  /*************************************************************************/
  /*                                                                       */
  /* Glyph Postscript Names handling                                       */
  /*                                                                       */
  /*   By default, FreeType 2 is compiled with the `psnames' module.  This */
  /*   module is in charge of converting a glyph name string into a        */
  /*   Unicode value, or return a Macintosh standard glyph name for the    */
  /*   use with the TrueType `post' table.                                 */
  /*                                                                       */
  /*   Undefine this macro if you do not want `psnames' compiled in your   */
  /*   build of FreeType.  This has the following effects:                 */
  /*                                                                       */
  /*   - The TrueType driver will provide its own set of glyph names,      */
  /*     if you build it to support postscript names in the TrueType       */
  /*     `post' table, but will not synthesize a missing Unicode charmap.  */
  /*                                                                       */
  /*   - The Type 1 driver will not be able to synthesize a Unicode        */
  /*     charmap out of the glyphs found in the fonts.                     */
  /*                                                                       */
  /*   You would normally undefine this configuration macro when building  */
  /*   a version of FreeType that doesn't contain a Type 1 or CFF driver.  */
  /*                                                                       */
#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES
-->8-

I found, if comment/remove FT_CONFIG_OPTION_POSTSCRIPT_NAMES define in
include/freetype/config/ftoption.h file, then this may fix issue for this PR.
Maybe, there are other solutions, of course.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

maintainer-approval requested: [Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9 : [Attachment 193012] Proposed patch (since 468892 revision)

bugzilla-noreply
In reply to this post by bugzilla-noreply
lightside <[hidden email]> has asked freebsd-gnome mailing list
<[hidden email]> for maintainer-approval:
Bug 227761: print/freetype2: Fonts aren't correctly rendered with 2.9
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

Attachment 193012: Proposed patch (since 468892 revision)
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193012&action=edit



--- Comment #4 from lightside <[hidden email]> ---
Created attachment 193012
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193012&action=edit
Proposed patch (since 468892 revision)

(In reply to comment #3)
Attached proposed patch with following changes:
- Bump PORTREVISION
- Add GPN option for "Glyph Postscript Names handling"

The fix for this PR is disabled GPN option, in this case. Please test.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
 Attachment #193012|                            |maintainer-approval?(gnome@
              Flags|                            |FreeBSD.org)

--- Comment #4 from lightside <[hidden email]> ---
Created attachment 193012
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193012&action=edit
Proposed patch (since 468892 revision)

(In reply to comment #3)
Attached proposed patch with following changes:
- Bump PORTREVISION
- Add GPN option for "Glyph Postscript Names handling"

The fix for this PR is disabled GPN option, in this case. Please test.

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #5 from lightside <[hidden email]> ---
Created attachment 193013
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193013&action=edit
Testing environment for freetype2, based on git bisect

(In reply to comment #3)
> I slightly modified testing environment for freetype2, which I introduced in
> bug 219608 comment #27.
Also attached archive with modified testing environment, if somebody
interested.

How to use:
1. Extract (downloaded) attached archive to new directory:
% mkdir bisect
% tar -xf freetype2_bisect.tar.bz2 -C bisect
2. Change destination to new directory and clone freetype2 git repository in
it:
% cd bisect
% git clone https://git.savannah.gnu.org/git/freetype/freetype2.git
3. Configure needed options in test.sh file, e.g. OPTION_SUBPIXEL_HINTING,
OPTION_LONG_PCF_NAMES, OPTION_SUBPIXEL_RENDERING, which will be used, when
available.
4. Configure expected_checksum variable in test.sh file:
4.1 Checkout VER-2-8:
% cd freetype2
% git checkout VER-2-8
4.2 And run test.sh in related directory:
% ../test.sh
If there were no errors, this gives some sha256 checksum, which need to specify
for expected_checksum variable in test.sh file:
expected_checksum="1370a12f43a024354c77b206c6af83a9ae330ca8d31361ceea2895a23458a9ec"
4.3. (Optional) Checkout previous commit, e.g. master:
% git checkout master
5. Configure git bisect and run it:
% git bisect start VER-2-9-1 VER-2-8 --
% git bisect run ../test.sh
6. At the end this may show found commit, which possible to check with `git
bisect visualize` and `git bisect log` commands.
7. Finish bisection search and go back to (previous) commit:
% git bisect reset

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193013|0                           |1
        is obsolete|                            |

--- Comment #6 from lightside <[hidden email]> ---
Created attachment 193036
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193036&action=edit
Testing environment for freetype2, based on git bisect

(In reply to Baptiste Daroussin from comment #2)
> I can reproduce for sure, but I am not sure how to debug that :(
I think, also possible to enable some debugging features in a FreeType 2 builds
(e.g. selected DEBUG option for print/freetype2 port):
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/DEBUG?h=VER-2-9-1#n1
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h?h=VER-2-9-1#n398

After build possible to use FT2_DEBUG (and/or other) environment variable(s) in
conjunction with test program. For example:
% env FT2_DEBUG="any:5" LD_PRELOAD=./objs/.libs/libfreetype.so sh -c "convert
-append path/to/file.pdf image.jpg 2>&1"

Attached new archive with testing environment:
- Added -d option for "git clean" command to also remove created directories
during build, e.g. ./objs/.libs
- Added help, clean, build, test options for test.sh script
- Added some debugging settings
- Removed anonyme_visitenkarte.pdf file, which possible to download/extract
from previous attachment #193013:
% fetch -o - "https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193013" | tar
-xf - --include anonyme_visitenkarte.pdf
% sha256 anonyme_visitenkarte.pdf
SHA256 (anonyme_visitenkarte.pdf) =
949b114d3e2cf21fc7f97ade1491c73c292fee04525c2cf551ab05543901d6ae

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #7 from lightside <[hidden email]> ---
Created attachment 193039
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193039&action=edit
The freetype2 debug output for ImageMagick convert program

(In reply to comment #6)
> I think, also possible to enable some debugging features
> in a FreeType 2 builds
Possible to compare debugging outputs for previous and found
75cb071b3fbfa2315c5d458fee2bb465a14568ae commit.
-8<--
% fetch -o freetype2_bisect.tar.bz2
"https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193036"
<..>
% sha256 freetype2_bisect.tar.bz2
SHA256 (freetype2_bisect.tar.bz2) =
f521934f01a2fdbaa5a9b129ea65c70dc510f82310fb23deba92df71da7528af
% mkdir bisect
% tar -xf freetype2_bisect.tar.bz2 -C bisect
% cd bisect
% fetch -o - "https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193013" | tar
-xf - --include anonyme_visitenkarte.pdf
<..>
% sha256 anonyme_visitenkarte.pdf
SHA256 (anonyme_visitenkarte.pdf) =
949b114d3e2cf21fc7f97ade1491c73c292fee04525c2cf551ab05543901d6ae
% git clone https://git.savannah.gnu.org/git/freetype/freetype2.git
<..>
% cd freetype2
% git checkout 75cb071b3fbfa2315c5d458fee2bb465a14568ae^
<..>
HEAD is now at 390048fa4 Remove deprecated comment.
% ../test.sh build
<..>
% convert --version | head -1
Version: ImageMagick 6.9.9-28 Q16 amd64 2018-04-29 http://www.imagemagick.org
% mkdir -p ../output/prev
% git show -s --format="# %s%n#
<a href="https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H">https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H"
75cb071b3fbfa2315c5d458fee2bb465a14568ae^ > ../output/prev/commit.txt
% seq 5 | xargs -I {} -L 1 env FT2_DEBUG="any:{}"
LD_PRELOAD=./objs/.libs/libfreetype.so sh -c "convert -append
../anonyme_visitenkarte.pdf image.jpg 2>&1 | tee ../output/prev/{}.txt"
<..>
% ../test.sh clean
% git checkout 75cb071b3fbfa2315c5d458fee2bb465a14568ae
Previous HEAD position was 390048fa4 Remove deprecated comment.
HEAD is now at 75cb071b3 [sfnt] Synthesize a Unicode charmap if one is missing.
% ../test.sh build
<..>
% mkdir -p ../output/found
% git show -s --format="# %s%n#
<a href="https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H">https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H"
75cb071b3fbfa2315c5d458fee2bb465a14568ae > ../output/found/commit.txt
% seq 5 | xargs -I {} -L 1 env FT2_DEBUG="any:{}"
LD_PRELOAD=./objs/.libs/libfreetype.so sh -c "convert -append
../anonyme_visitenkarte.pdf image.jpg 2>&1 | tee ../output/found/{}.txt"
<..>
% ../test.sh clean
% git checkout master
<..>
-->8-

Attached archive with output results for various debugging levels (from 1 to
5), which possible to compare with using diff (or other) command:
% diff -ruNd prev found > result.diff

The question is how to interpret such results and find related changes in the
source code.
The first guess was about FT_CONFIG_OPTION_POSTSCRIPT_NAMES define (see comment
#3).

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #8 from Pascal Christen <[hidden email]> ---
(In reply to lightside from comment #4)

Thank you for debugging. This patch works for me. Any impact when applying this
patch?

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #9 from lightside <[hidden email]> ---
(In reply to Pascal Christen from comment #8)
> Any impact when applying this patch?
The disabled GPN port's option may disable FT_CONFIG_OPTION_POSTSCRIPT_NAMES
define in include/freetype/config/ftoption.h file:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h?h=VER-2-9-1#n290
This may disable psnames module, which "is in charge of converting a glyph name
string into a Unicode value, or return a Macintosh standard glyph name for the
use with the TrueType `post' table" (from description of ftoption.h file):
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/modules.cfg?h=VER-2-9-1#n154
-8<--
# Support for PostScript glyph names.
#
# This module can be controlled in ftconfig.h
# (FT_CONFIG_OPTION_POSTSCRIPT_NAMES).
AUX_MODULES += psnames
-->8-
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/psnames/psmodule.c?h=VER-2-9-1#n47
etc.

If you need to just use ImageMagick convert (or other) program, then, as
intermediate solution, I may suggest to build libfreetype.so* without
FT_CONFIG_OPTION_POSTSCRIPT_NAMES define in include/freetype/config/ftoption.h
file and use LD_PRELOAD environment variable for needed program (while ABI is
compatible):
% env LD_PRELOAD=path/to/libfreetype.so convert file.pdf image.jpg

For example, apply patch for print/freetype2 in attachment #193012 (as you
already did, e.g. in some user's directory):
% svn co -r 468892 https://svn.FreeBSD.org/ports/head/print/freetype2
% fetch -o freetype2.diff
"https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193012"
<..>
% cd freetype2
% svn patch ../freetype2.diff

Then build without GPN option and copy libfreetype.* files to another location:
% make WITHOUT=GPN stage
<..>
% ls work/stage/usr/local/lib/libfreetype*
work/stage/usr/local/lib/libfreetype.a        
work/stage/usr/local/lib/libfreetype.so.6
work/stage/usr/local/lib/libfreetype.so        
work/stage/usr/local/lib/libfreetype.so.6.16.1
% mkdir ../freetype2_libs
% cp -fp work/stage/usr/local/lib/libfreetype* ../freetype2_libs
% make clean
<..>

The ../freetype2_libs will contain needed libfreetype.so library (and related
files), in this case:
% cd ..
% fetch -o - "https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193013" | tar
-xf - --include anonyme_visitenkarte.pdf
% env LD_PRELOAD=./freetype2_libs/libfreetype.so convert -append
anonyme_visitenkarte.pdf image.jpg

As for overall issue, the affected commit is
75cb071b3fbfa2315c5d458fee2bb465a14568ae (according to git bisect):
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=75cb071b3fbfa2315c5d458fee2bb465a14568ae

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193039|0                           |1
        is obsolete|                            |

--- Comment #10 from lightside <[hidden email]> ---
Created attachment 193066
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193066&action=edit
The freetype2 debug output for ImageMagick convert program

Created debugging output for 2b3e0ef6c095cf6ea920e95fc9826dc39694162a commit:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=2b3e0ef6c095cf6ea920e95fc9826dc39694162a
-8<--
% echo $FREETYPE_PROPERTIES
FREETYPE_PROPERTIES: Undefined variable.
% pkg info fontconfig | grep -e ^Version -e ^Options -e ": on" -e ": off"
Version        : 2.12.6,1
Options        :
        DOCS           : on
        HINTING_FULL   : off
        HINTING_MEDIUM : off
        HINTING_NONE   : off
        HINTING_SLIGHT : on
        NO_BITMAPS     : off
% cat ${HOME}/.config/fontconfig/fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
        <match target="font">
                <edit mode="assign" name="rgba">
                        <const>rgb</const>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="hinting">
                        <bool>true</bool>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="hintstyle">
                        <const>hintslight</const>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="antialias">
                        <bool>true</bool>
                </edit>
        </match>
        <match target="font">
                <edit mode="assign" name="lcdfilter">
                  <const>lcddefault</const>
                </edit>
        </match>
        <match target="pattern">
                <test qual="any" name="size" compare="less_eq">
                        <int>12</int>
                </test>
                <edit name="antialias" mode="assign">
                        <bool>false</bool>
                </edit>
        </match>
</fontconfig>
% git describe
VER-2-9-1-3-g2b3e0ef6c
% setenv OUTPUT `git describe`
% echo $OUTPUT
VER-2-9-1-3-g2b3e0ef6c
% ../test.sh build
<..>
% ../test.sh test
81d778f88b71adbd4d99f9b405d53779042d02043bacd8f94f76d690e6ec1600
not match
% mkdir -p ../output/$OUTPUT
% git show -s
--format="%s%nhttps://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H"
Support symbol visibility features of Sun / Oracle C compilers. Reported by
Kiyoshi Kanazawa:
https://lists.gnu.org/archive/html/freetype-devel/2018-05/msg00008.html Thanks
to the suggestions by Alexei and Alan Coopersmith.
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=2b3e0ef6c095cf6ea920e95fc9826dc39694162a
% git show -s --format="# %s%n#
<a href="https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H">https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=%H" >
../output/$OUTPUT/commit.txt
% seq 5 | xargs -I {} -L 1 env FT2_DEBUG="any:{}"
LD_PRELOAD=./objs/.libs/libfreetype.so sh -c "convert -append
../anonyme_visitenkarte.pdf image.jpg 2>&1 | tee ../output/$OUTPUT/{}.txt"
<..>
% ../test.sh clean
-->8-

Added VER-2-9-1-3-g2b3e0ef6c directory to debug_output.tar.bz2 archive from
attachment #193039.

Some comments to "Sat 05 May 2018 06:54:13 AM UTC" on
https://savannah.nongnu.org/bugs/?53739#comment5:
Need to note, that so called testing environment (attachment #193036) was
created on FreeBSD (10.3, 10.4) and tested for /bin/sh in FreeBSD base:
https://www.freebsd.org/cgi/man.cgi?query=sh&apropos=0&sektion=0&manpath=FreeBSD+10.4-RELEASE&arch=default&format=html
% sha256 /bin/sh
SHA256 (/bin/sh) =
ea533f9919285db456d647dade105846af9ba6d2638dee1f7ffe43c51460fef3

Also, I didn't propose to comment FT_CONFIG_OPTION_POSTSCRIPT_NAMES define in
include/freetype/config/ftoption.h file as a solution for upstream. This is
just a so called "workaround" (or an intermediate solution, because the
disabled GPN option is not default (i.e. OPTIONS_DEFAULT+=GPN in attachment
#193012) for print/freetype2 port), based on changes in
75cb071b3fbfa2315c5d458fee2bb465a14568ae commit:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=75cb071b3fbfa2315c5d458fee2bb465a14568ae

I just showed some examples about how to possibly debug print/freetype2 port on
FreeBSD for this PR. Also shared some testing environment (and results), which
I used for git bisect run, and asked about whether (disabled)
FT_CONFIG_OPTION_POSTSCRIPT_NAMES define affects this issue for PR's
reporter(s).

Thanks for attention.

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193036|0                           |1
        is obsolete|                            |

--- Comment #11 from lightside <[hidden email]> ---
Created attachment 193068
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193068&action=edit
Testing environment for freetype2, based on git bisect

(In reply to comment #11)
> Some comments to "Sat 05 May 2018 06:54:13 AM UTC" on
> https://savannah.nongnu.org/bugs/?53739#comment5
Converted some names of functions with hyphen(s) to _ variants in test.sh
script, just in case.

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193068|0                           |1
        is obsolete|                            |

--- Comment #12 from lightside <[hidden email]> ---
Created attachment 193168
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193168&action=edit
Testing environment for freetype2, based on git bisect

Changed "WITHOUT_DEBUG_FILES=yes        WITHOUT_KERNEL_SYMBOLS=yes" to
"MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no" in test.sh script, after ports r469338
changes for Mk/bsd.port.mk, just in case. In this regard, the
patch/configure/build stages in test.sh script was created on base of what is
used in FreeBSD ports (on some period of time). Some environment variables
maybe not used for actual freetype2 configure/build process, but as is.

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193066|0                           |1
        is obsolete|                            |

--- Comment #13 from lightside <[hidden email]> ---
Created attachment 193316
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193316&action=edit
The freetype2 debug output for ImageMagick convert program

I found, that installed Ghostscript 9.16 version is possible cause of this
issue:
% pkg info -d ImageMagick | grep ghostscript
        ghostscript9-agpl-x11-9.16_2
        ghostscript9-agpl-base-9.16_5
% pkg info -xo ghostscript ImageMagick
ghostscript9-agpl-base-9.16_5  print/ghostscript9-agpl-base
ghostscript9-agpl-x11-9.16_2   print/ghostscript9-agpl-x11
ImageMagick-6.9.9.28,1         graphics/ImageMagick

https://www.freshports.org/print/ghostscript9-agpl-base
https://www.freshports.org/print/ghostscript9-agpl-x11

As I understood, there is a usage of "agpl" type of ghostscript's ports by
default:
https://github.com/freebsd/freebsd-ports/blob/518ef677fadda04fc579509938a445639e1535f9/Mk/bsd.default-versions.mk#L45-L46
-8<--
# Possible values: 7, 8, 9, agpl
GHOSTSCRIPT_DEFAULT?= agpl
-->8-

https://github.com/freebsd/freebsd-ports/blob/7c530a068083f634f8df021dd4642dcdc7c2f310/Mk/Uses/ghostscript.mk#L32-L35
-8<--
# allowed versions
# When adding a version, please keep the comment in
# Mk/bsd.default-versions.mk in sync.
_GS_VERSION= 7 8 9 agpl
-->8-

https://github.com/freebsd/freebsd-ports/blob/7c530a068083f634f8df021dd4642dcdc7c2f310/Mk/Uses/ghostscript.mk#L43-L45
-8<--
.if ${GHOSTSCRIPT_DEFAULT:N[789]:Nagpl}
IGNORE?=        Invalid GHOSTSCRIPT_DEFAULT value: ${GHOSTSCRIPT_DEFAULT},
please select one of ${_GS_VERSION}
.endif
-->8-

There is no issue, if using Ghostscript 9.06 version, by adding
"DEFAULT_VERSIONS+=ghostscript=9" (without quotes) to /etc/make.conf file and
rebuild of graphics/ImageMagick port (after removal of currently installed
ghostscript packages, e.g. with using following command: `pkg delete -fx
ghostscript ImageMagick`):
% pkg info -xo ghostscript ImageMagick
ghostscript9-base-9.06_13      print/ghostscript9-base
ghostscript9-x11-9.06_12       print/ghostscript9-x11
ImageMagick-6.9.9.28,1         graphics/ImageMagick

https://www.freshports.org/print/ghostscript9-base
https://www.freshports.org/print/ghostscript9-x11

Added new freetype2 debug output (in "9" directory of archive), when using
Ghostscript 9.06 version. For the same commits:
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=390048fa468dfee06f722da6b8ca1b79022480d6
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=75cb071b3fbfa2315c5d458fee2bb465a14568ae
https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=2b3e0ef6c095cf6ea920e95fc9826dc39694162a

Some differences from previous attachment #193066:
- Moved "prev", "found" and "VER-2-9-1-3-g2b3e0ef6c" directories to "agpl"
directory
- Added generated image.jpg files to corresponding directories
- Added packages.txt file(s) to "9" and "agpl" directories, which contains
information about `pkg info -xo ghostscript ImageMagick` output

Werner Lemberg said (in https://savannah.nongnu.org/bugs/?53739#comment3), that
"Using gs 9.23 the PDF gets displayed fine". As I understood, the 9.23 is
currently latest Ghostscript version:
https://www.ghostscript.com/News.html
https://www.ghostscript.com/Ghostscript_9.23.html

Probably, another possible fix (in addition to usage of other
GHOSTSCRIPT_DEFAULT value, except "agpl") is to update
print/ghostscript9-agpl-base and print/ghostscript9-agpl-x11 ports to 9.23 (or
other) version, which may have fix(es) for this issue.

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193012|maintainer-approval?(gnome@ |
              Flags|FreeBSD.org)                |
 Attachment #193012|Proposed patch (since       |Patch for print/freetype2
        description|468892 revision)            |(since 468892 revision)

--- Comment #14 from lightside <[hidden email]> ---
Comment on attachment 193012
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=193012
Patch for print/freetype2 (since 468892 revision)

Renamed description of attachment #193012.

The patch was used to test issue in this PR, when using disabled GPN port's
option (or as a "workaround") and installed print/ghostscript9-agpl-base and
print/ghostscript9-agpl-x11 ports for 9.16 version.

--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

--- Comment #15 from lightside <[hidden email]> ---
(In reply to comment #13)
The print/ghostscript9-agpl-base and print/ghostscript9-agpl-x11 ports was
updated to 9.23 version in ports r472239 by tijl@.

Looks like, this fixed issue for this PR. Please test.

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

[Bug 227761] print/freetype2: Fonts aren't correctly rendered with 2.9

bugzilla-noreply
In reply to this post by bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227761

lightside <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #193168|0                           |1
        is obsolete|                            |

--- Comment #16 from lightside <[hidden email]> ---
Created attachment 194200
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=194200&action=edit
Testing environment for freetype2, based on git bisect

(In reply to comment #15)
The git bisect (e.g.
expected_checksum="5c7f74eef068eaf2f3db0cb24a1fa0914dc4654e28b08b15ee1a1add8a0413de"
in test.sh, based on sha256 checksum for generated image.jpg from VER-2-8 tag)
may find the same 75cb071b3fbfa2315c5d458fee2bb465a14568ae commit. But possible
to read characters from generated image.jpg, when using Ghostscript 9.23 (and
9.06).

Updated value for expected_checksum variable in test.sh script from attachment
#193316, just in case.

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"
12