Page 1 of 1

Gravity Center not centered with text

Posted: 2017-10-18T03:16:21-07:00
by Sardoan
Gravity center does not center correctly for all letters. With trim it cuts off letters:
Image

Re: Gravity Center not centered with text

Posted: 2017-10-18T03:30:05-07:00
by snibgo
Please state your IM version and platform.

If you don't show your code, the problem cannot be reproduced, so it won't be fixed.

Also say where your font came from.

Re: Gravity Center not centered with text

Posted: 2017-10-18T03:56:19-07:00
by Sardoan
Version:
Version: ImageMagick 6.8.9-9 Q16 x86_64

OS:
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Fonts:
https://fonts.google.com/specimen/Roboto https://fonts.google.com/specimen/Open+Sans

Code: (Fragment from elixir with the options)
System.cmd "convert", [
"-density", "144",
"-size", "960x960",
"-background", "...",
"-fill", "...",
"-font", "Open-Sans",
"-gravity", "Center",
"label: MR",
"-resample", "72",
"-trim"
]

Re: Gravity Center not centered with text

Posted: 2017-10-18T18:11:57-07:00
by snibgo
The image has a black border. So that code did not make that image.

Re: Gravity Center not centered with text

Posted: 2017-10-19T02:46:20-07:00
by Sardoan
The code made the image. It is a screenshot from my virtual machine. Its the view from the atom-editor. Left the black border to show where the image ends. Made the screenshot with windows having my virtual machine open. Sorry for the confusion. The image rendered with ImageMagick is the picture with the red background.

The picture gets generated during a test, where I put a sleep. After the test the picture gets deleted, so screenshot was the fastest way. If you need the created picture I can upload it while the test is in sleep.

Re: Gravity Center not centered with text

Posted: 2017-10-19T09:54:46-07:00
by fmw42
Please do not post the same question to multiple forums. You have the same posted to the User's forum. See response there.