This repository was archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 31
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
Fonts rendering differently between macOS and Ubuntu #113
Copy link
Copy link
Open
Labels
Description
Given the following test script:
require 'mathematical'
renderer = Mathematical.new(format: :png, ppi: 300.0)
File.write('test.png', renderer.render('$x$').fetch(:data))Running it on macOS 13.2.1 with 1.6.14 produces the following image:
Running it on Ubuntu 22.04, Ubuntu 20.04 and Ubuntu 18.04 with 1.6.14 produces the following image:
I tested macOS by installing the dependencies with Homebrew and installing the required fonts as detailed in the README:
brew install glib gdk-pixbuf cairo pango cmakeI tested Ubuntu using the ubuntu:22.04, ubuntu:20.04 and ubuntu:18.04 Docker images and installing the necessary dependencies with the following:
apt update
apt install -qq -y ruby ruby-dev bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake g++ libwebp-dev libzstd-dev
gem install mathematical --no-documentI can confirm the LyX fonts are installed with:
# fc-list | grep lyx
/usr/share/fonts/truetype/lyx/msbm10.ttf: msbm10:style=LyX
/usr/share/fonts/truetype/lyx/cmr10.ttf: cmr10:style=LyX
/usr/share/fonts/truetype/lyx/eufm10.ttf: eufm10:style=LyX
/usr/share/fonts/truetype/lyx/rsfs10.ttf: rsfs10:style=LyX
/usr/share/fonts/truetype/lyx/cmex10.ttf: cmex10:style=LyX
/usr/share/fonts/truetype/lyx/cmmi10.ttf: cmmi10:style=LyX
/usr/share/fonts/truetype/lyx/cmsy10.ttf: cmsy10:style=LyX
/usr/share/fonts/truetype/lyx/msam10.ttf: msam10:style=LyX
/usr/share/fonts/truetype/lyx/wasy10.ttf: wasy10:style=LyX
/usr/share/fonts/truetype/lyx/esint10.ttf: esint10:style=LyX
/usr/share/fonts/truetype/lyx/stmary10.ttf: stmary10:style=LyXI also tried compiling the gem on Ubuntu from source but it still produced the same output.

