Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering issues for items #260

Open
thobl opened this issue Sep 5, 2019 · 10 comments

Comments

@thobl
Copy link

commented Sep 5, 2019

Since Ipe 7.2.12 (I believe this did not happen in Ipe 7.2.11), I sometimes get rendering issues as shown for example in the pictures attached below. It happens rather frequently but is hard to reproduce as it seems somewhat non-deterministic. A way I can reproduce it more or less reliably is the following:

  1. Create paragraph labels (preferably using many different characters; don't know whether this is really crucial).
  2. Select "item" as the label type from the drop-down box offering "normal", "center", "itemize", and "item" as options (this seems to be crucial).
  3. Zoom in and out vigorously using the mouse wheel.

This should at some point lead to a rendering issue as show in the pictures below. Once this issue appears, it does not go away without restarting ipe, i.e., continuing to zoom only slightly changes the rendering to something that is likely also broken.

ipe-bug1
ipe-bug2
ipe-bug3
ipe-bug4

@otfried

This comment has been minimized.

Copy link
Owner

commented Sep 6, 2019

On which platform did you observe this?

@thobl

This comment has been minimized.

Copy link
Author

commented Sep 7, 2019

Arch Linux on a Dell XPS 13 (9343)

@ariand

This comment has been minimized.

Copy link

commented Sep 8, 2019

Same problem here, even with simple math labels. Once the problem occurs, even running LaTeX manually by pressing Ctrl+L does not help, the text is just rendered incorrectly in a slightly different way. Changing the LaTeX engine in the document properties does not help either.

Operating system: Arch Linux.
Ipe: version 7.2.12 compiled from source (well, AUR).
Qt: version 5.13.0.
pdftex -version outputs:

pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux)
kpathsea version 6.3.1
Copyright 2019 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11
Compiled with poppler version 0.80.0

Update: I just went all the way back to Ipe 7.2.6, and every version has the same problem. Weird, I can remember that 7.2.7 used to work fine before upgrading to 7.2.12. Lots of other packages have been upgraded since then, though, for example: Qt 5.10.x → 5.13.x, TeX Live 2018 → 2019…

@otfried

This comment has been minimized.

Copy link
Owner

commented Sep 8, 2019

The critical component here is the Freetype library. That's what Ipe uses to render text.

Which version of Freetype or you using (Ipe -> Help -> Show Libraries)?

@thobl

This comment has been minimized.

Copy link
Author

commented Sep 9, 2019

  • Pdftex, Xetex, or Luatex
  • Lua 5.3 (1378 kB used)
  • The font rendering library Freetype 2.10.0 / 2.10.1
  • The rendering library Cairo 1.16.0 / 1.17.3
  • The GUI toolkit Qt 5.12.3 / 5.13.0
  • The compression library zlib 1.2.11
@ariand

This comment has been minimized.

Copy link

commented Sep 9, 2019

  • Pdftex, Xetex, or Luatex
  • Lua 5.3 (915 kB used)
  • The font rendering library Freetype 2.10.1 / 2.10.1
  • The rendering library Cairo 1.17.3 / 1.17.3
  • The GUI toolkit Qt 5.13.0 / 5.13.0
  • The compression library zlib 1.2.11
@zwang2

This comment has been minimized.

Copy link

commented Sep 13, 2019

If you downgrade Cairo to 1.16.0, the problem seems to disappear. On Archlinux, downgrading can be achieved using local cached package at /var/cache/pacman/pkg/, or modify /etc/pacman.d/mirrorlist and put the following line as the first entry:

Server=https://archive.archlinux.org/repos/2019/08/02/$repo/os/$arch

and then run pacman -Syy and pacman -S cairo

Ipe does not seem to need recompiling. On Archlinux, the 1.17.2 version is the one after 1.16.0, which is the first version of cairo that causes the problem.

@otfried

This comment has been minimized.

Copy link
Owner

commented Sep 13, 2019

I have looked at the commit messages for Cairo between 1.16.0 and 1.17.2 (there was no release on Cairo master inbetween), and found only one that looks like it could be related:

717f0e type1: fallback if the font matrix is not a uniform scale

https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1790242

I'll have some time in October to check if removing this fixes the problem. Of course it could also be that Archlinux has private modifications, I haven't checked that yet.

@otfried

This comment has been minimized.

Copy link
Owner

commented Sep 13, 2019

By the way, Cairo says that 1.16.0 is the stable version, while 1.17.2 is called a "snapshot".

@otfried otfried self-assigned this Sep 13, 2019

@zwang2

This comment has been minimized.

Copy link

commented Sep 13, 2019

it could also be that Archlinux has private modifications.

This does not seem to be the case. The entirety of the PKGBUILD file (no other files involved in the build process other than the sources) is pasted below:

# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Brice Carpentier <brice@daknet.org>

pkgname=cairo
pkgver=1.17.2+17+g52a7c79fd
pkgrel=1
pkgdesc="2D graphics library with support for multiple output devices"
url="https://cairographics.org/"
arch=(x86_64)
license=(LGPL MPL)
depends=(libpng libxrender libxext fontconfig pixman glib2 lzo)
makedepends=(librsvg gtk2 poppler-glib libspectre gtk-doc valgrind git)
checkdepends=(ttf-dejavu gsfonts)
_commit=52a7c79fd4ff96bb5fac175f0199819b0f8c18fc  # master
source=("git+https://gitlab.freedesktop.org/cairo/cairo.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd cairo
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd cairo

  # Update gtk-doc
  cp /usr/share/aclocal/gtk-doc.m4 build/aclocal.gtk-doc.m4
  cp /usr/share/gtk-doc/data/gtk-doc.make build/Makefile.am.gtk-doc

  # Fix typo
  sed -i 's/have_png/use_png/g' configure.ac

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd cairo
  ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --disable-static \
        --disable-gl \
        --enable-tee \
        --enable-svg \
        --enable-ps \
        --enable-pdf \
        --enable-gobject \
        --enable-gtk-doc \
        --enable-full-testing \
        --enable-test-surfaces
  sed -i 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd cairo
  # FIXME: tests don't pass
  env CAIRO_TEST_TARGET=image \
      CAIRO_TEST_TARGET_FORMAT=rgba \
      CAIRO_TESTS='!pthread-show-text' make -k check || :
}

package() {
  cd cairo
  make DESTDIR="$pkgdir" install
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.