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

Generated cards text blank and centrally-aligned - 06-2022 #14

Open
Jamnoggin opened this issue Jul 2, 2022 · 13 comments
Open

Generated cards text blank and centrally-aligned - 06-2022 #14

Jamnoggin opened this issue Jul 2, 2022 · 13 comments

Comments

@Jamnoggin
Copy link

Generated cards text blank and centrally-aligned - Noticed 06-2022

Browsers tested Safari, Chrome MacOS (iMac).

iOS iPhone (Safari
Screenshot 2022-07-02 at 09 14 23
)

@jdahll
Copy link

jdahll commented Aug 6, 2022

This seems to be caused by new security policies in ImageMagick.

I'm running this on a personal/internal webserver, so not sure of the implications of disabling the security on the Internet at wild.

Ubuntu20.04/Apache2/PHP/ImageMagick6

Edit /etc/ImageMagick-6/policy.xml

Towards the bottom comment out all the "<policy domain" lines that have rights="none".

@jdahll
Copy link

jdahll commented Aug 6, 2022

Problem I can't figure out now is how to get special symbols (such as registered trademark symbol ® ) to show up on cards.
Right now they just come out having acted like that symbol doesn't exist.
I suspect it's a matter of finding the correct "HelveticaNeueBold.ttf" file, but no leads on how to obtain the right one that will support this symbol.

@jdahll
Copy link

jdahll commented Aug 6, 2022

Had to set the System Locale on the OS via localctl for the registered trademark symbol to work.

apt -y install language-pack-en language-pack-en-base

localectl set-locale LANG=en_US.UTF-8

@BLEEDINGBLACKROSE
Copy link

i am having the same issue with no text being generated, has this issue been solved?

@Jamnoggin
Copy link
Author

It wasn’t working for me after jdahll’s update.

I’m in the UK. Wondering if the regional settings make a difference with that font pack, assuming jdahll is in the US and it works in that location now.

Where are you based BLEEDINGBLACKROSE?

@Jamnoggin Jamnoggin reopened this Aug 11, 2022
@BLEEDINGBLACKROSE
Copy link

I am from South Africa, doent render on PC or my phone

@Narcissus04
Copy link

Hi, UK here - did this get sorted? Couldn't really follow the instructions to get it going

@Jamnoggin
Copy link
Author

Hi, UK here - did this get sorted? Couldn't really follow the instructions to get it going

Hey no I tested it using ProtoVPN on a U.S. server but still did the same. 😕

@kasekesy
Copy link

kasekesy commented Oct 12, 2022

doesnt work me either in canada.... super disappointed had a bunch of cards i wanted to make and it used to work flawlessly

@Brinsky
Copy link

Brinsky commented Oct 16, 2022

jdahll is running their own copy of the server - the language pack details are for getting special characters to work correctly. Those details aren't related to the (seemingly broken) instance hosted on http://mywastedlife.com/CAH, so accessing the site from different locations won't help.

I spent some time getting a server of my own running on an Arch Linux machine. Here are my raw notes around the setup (I hadn't previously had Apache or PHP installed):

Original generator is http://mywastedlife.com/CAH/ (source code is https://github.com/zaffudo/CAH-Generator). At some point in 2022, it started returning blank cards - see #14.

On Arch Linux, install relevant packages:

Prepare the server and website (note - you will need to run most commands as root):

  • Make the http user the owner of the /srv/http directory: chown -R http:http /srv/http
  • Git clone'd https://github.com/zaffudo/CAH-Generator under /srv/http
  • Acquire HelveticaNeue font sources and place them in /srv/http/CAH-Generator/fonts/
    • The specific requirement is to have a file named HelveticaNeueBold.tff in that folder
  • Change CAH-Generator/blob/master/generator.php:110 to read mkdir($path, 0777, true); (seems like a PHP version/variant difference)
  • systemctl start httpd.service php-fpm.service (you could also do enable --now)
  • Can now accesshttp://localhost/CAH-Generator/index.html

Extra:

  • My fonts came with names of the form HelveticaNeue-Bold.ttf, so I installed/used the perl-rename package to rename them:
    • perl-rename 's/(HelveticaNeue)-?(\w+)\.(\w*)/$1$2\.$3/' /srv/http/CAH-Generator/fonts/*
  • tail -f /var/log/httpd/error_log was useful for debugging Apache/PHP errors

After that, I was able to successfully generate cards at http://localhost/CAH-Generator/index.html.

@Brinsky
Copy link

Brinsky commented Oct 16, 2022

FYI, it seems like there is one fork whose author is hosting a public version: http://erftech.com/CAH (from https://github.com/DJalup/CAH-Generator). I haven't tried using it.

@Jamnoggin
Copy link
Author

FYI, it seems like there is one fork whose author is hosting a public version: http://erftech.com/CAH (from https://github.com/DJalup/CAH-Generator). I haven't tried using it.

Oh neat I only just saw this update. Yes that host works, thank you so much!

The only difference in output comparing with other cards I've already exported from the OG site is the test height is about a millimetre higher up but it really won't be noticeable.

Now I just have to make the jump and order a test batch of custom printed cards!

@addiekitten
Copy link

This issue persists in 2024. Does anyone have or know of a functional fork/mirror? the efrtech appears to be completely gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants