It is currently 16 Apr 2024, 06:53
   
Text Size

HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01/29)

by Nate and Snacko

Moderators: Snacko, CCGHQ Admins

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby rs800 » 16 Jan 2018, 16:49

Who can share font sizes for russian cards? I tried to generate myself. It turned out ... this.
Attachments
Новый Холст.jpg
Angel of Sanctions.full.jpg
rs800
 
Posts: 10
Joined: 13 Jan 2018, 14:36
Has thanked: 4 times
Been thanked: 0 time

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby ahkren » 16 Jan 2018, 18:56

rs800 wrote:Who can share font sizes for russian cards? I tried to generate myself. It turned out ... this.
Looks like an error in how the renderer is splitting lines for Russian. I'll look into this and see what I can do.
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby ahkren » 16 Jan 2018, 20:06

So it appears to be a problem in the importer.
If you change all lines in scripts\classes\GathererExtractor.php that have
Code: Select all
preg_replace('/([a-z\p{Ll}#])([A-Z\p{Lu}])/s'
to
Code: Select all
preg_replace('/([a-z\p{Ll}#])([A-Z\p{Lu}])/su'
and reimport the language file, it appears to work.
Just needed to add the unicode flag to the preg_replace lines.
Attachments
Chandra, Pyrogenius.full.jpg
Angel of Sanctions.full.jpg
Last edited by ahkren on 16 Jan 2018, 20:21, edited 1 time in total.
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby rs800 » 16 Jan 2018, 20:19

ahkren wrote:
rs800 wrote:Who can share font sizes for russian cards? I tried to generate myself. It turned out ... this.
Looks like an error in how the renderer is splitting lines for Russian. I'll look into this and see what I can do.
This is my own database, if that. I used ge2lang
Attachments
WinRAR archive (2).rar
(834.66 KiB) Downloaded 396 times
rs800
 
Posts: 10
Joined: 13 Jan 2018, 14:36
Has thanked: 4 times
Been thanked: 0 time

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby ahkren » 16 Jan 2018, 21:48

Russian translation is attached from the fixed importer.
Attachments
russian.rar
(820.48 KiB) Downloaded 406 times
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby Oketado » 20 Jan 2018, 21:29

Is it OK?
| Open
Wanted Scoundrels.png

The text goes over the P\T in Russian language with some cards.
Oketado
 
Posts: 9
Joined: 06 Aug 2017, 19:18
Location: USSR
Has thanked: 6 times
Been thanked: 4 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby rs800 » 21 Jan 2018, 01:16

Oketado wrote:Is it OK?
| Open
The attachment Wanted Scoundrels.png is no longer available

The text goes over the P\T in Russian language with some cards.
I also have this problem.
Attachments
Aven Initiate.full.jpg
rs800
 
Posts: 10
Joined: 13 Jan 2018, 14:36
Has thanked: 4 times
Been thanked: 0 time

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/11

Postby ahkren » 26 Jan 2018, 01:00

Next update should have a fix for this.

In Renderer.php change all instances of
Code: Select all
if ($textSize["height"] < $maxHeight && $textSize["lineCount"] <= 8) break;
to
Code: Select all
if ($textSize["height"] < $maxHeight && $textSize["lineCount"] <= 8 && $textSize["lastLineWidth"] <= 514) break;
Attachments
Wanted Scoundrels.full.jpg
Aven Initiate.full.jpg
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2017/01

Postby ahkren » 29 Jan 2018, 20:49

Updated main post to 9.1.03
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby ahkren » 07 Feb 2018, 22:35

So I've been working hard on getting the Gatherer Extractor parsing working better for non English languages. I have new translations (still missing RIX) that I would like to run by native speakers, if any of you have time to check them out.
Attachments
spanish.zip
(1.11 MiB) Downloaded 405 times
russian.zip
(1.03 MiB) Downloaded 419 times
portugese.zip
(1.05 MiB) Downloaded 325 times
korean.zip
(455.03 KiB) Downloaded 311 times
japanese.zip
(1.25 MiB) Downloaded 315 times
italian.zip
(1.13 MiB) Downloaded 341 times
german.zip
(1.46 MiB) Downloaded 318 times
french-oracle.zip
(1.2 MiB) Downloaded 310 times
chinese-taiwan.zip
(574.34 KiB) Downloaded 303 times
chinese-china.zip
(1012.13 KiB) Downloaded 308 times
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby howdyhamster02 » 17 Feb 2018, 08:55

I'm trying to figure out what's changed with the pre-8th title rendering between versions 9.0.16 and 9.1.03. In particular, the lower-case 'a' and 'e' are noticeably different, and look more accurate on the older version. I copied over Pre8th.ttf, and even looked at the code a little bit, but no obvious reasons why.
Gaea's Cradle old.jpg
older version
Gaea's Cradle new.jpg
newer version
howdyhamster02
 
Posts: 1
Joined: 17 Feb 2018, 08:38
Has thanked: 1 time
Been thanked: 0 time

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby ahkren » 20 Feb 2018, 19:20

I'll take a look see what I can figure out

Edit: So, from what I can tell, there was something changed in the way that PHP handles fonts in the GD library between 5.2.9 and 5.5.0. PHP 5.2.9 renders the pre8th font fine, PHP 5.5.0 renders it differently. I'll keep looking to see if I can fix it.
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby proud » 26 Feb 2018, 06:15

Have you considered rendering the text at twice the size, and then scaling 50%?
aka ancestral, mproud
MTG.Design
proud
 
Posts: 68
Joined: 21 Apr 2010, 10:50
Has thanked: 6 times
Been thanked: 23 times

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby heliumdream » 09 Mar 2018, 06:31

Could be a lack of setting and configuration, but a couple of my first test cards came back funny.

The Future Sight version of Pact of Negation is showing a weird black spot behind the mana symbol.
Pact of Negation.full.jpg
Funny black area behind mana symbol

And the text alignment of the Masterpiece version is all jacked.
Pact of Negation.full.jpg
Strange text alignment
heliumdream
 
Posts: 3
Joined: 02 Feb 2018, 08:15
Has thanked: 2 times
Been thanked: 0 time

Re: HQ Cardgen M15/8th/Pre8th/Tokens/Emblem (Updated 2018/01

Postby ahkren » 14 Mar 2018, 18:14

Looks like the regex I have for shadow symbols was picking up the shadow symbol as a half size shadow for 0. Look for
Code: Select all
case (preg_match('/Half[WR]/', $symbol) ? true : false): $extention = 'half'; break;
in Renderer.php line 775 and comment it out
Code: Select all
//case (preg_match('/Half[WR]/', $symbol) ? true : false): $extention = 'half'; break;
uncomment
Code: Select all
//case 'HalfR': $extention = 'half'; break;
//case 'HalfW': $extention = 'half'; break;
in Renderer.php line 773 and 774.
That should fix that problem.

For the Invocations, it is currently a work in progress. I'm still having issues getting each line centered.
User avatar
ahkren
Programmer
 
Posts: 316
Joined: 18 Jan 2012, 20:43
Has thanked: 50 times
Been thanked: 201 times

PreviousNext

Return to HQ Card Generator

Who is online

Users browsing this forum: No registered users and 15 guests


Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 15 guests

Login Form