Page 22 of 25

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

PostPosted: 16 Jan 2018, 16:49
by rs800
Who can share font sizes for russian cards? I tried to generate myself. It turned out ... this.

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

PostPosted: 16 Jan 2018, 18:56
by ahkren
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.

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

PostPosted: 16 Jan 2018, 20:06
by ahkren
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.

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

PostPosted: 16 Jan 2018, 20:19
by rs800
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

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

PostPosted: 16 Jan 2018, 21:48
by ahkren
Russian translation is attached from the fixed importer.

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

PostPosted: 20 Jan 2018, 21:29
by Oketado
Is it OK?
| Open
Wanted Scoundrels.png

The text goes over the P\T in Russian language with some cards.

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

PostPosted: 21 Jan 2018, 01:16
by rs800
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.

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

PostPosted: 26 Jan 2018, 01:00
by ahkren
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;

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

PostPosted: 29 Jan 2018, 20:49
by ahkren
Updated main post to 9.1.03

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

PostPosted: 07 Feb 2018, 22:35
by ahkren
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.

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

PostPosted: 17 Feb 2018, 08:55
by howdyhamster02
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

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

PostPosted: 20 Feb 2018, 19:20
by ahkren
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.

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

PostPosted: 26 Feb 2018, 06:15
by proud
Have you considered rendering the text at twice the size, and then scaling 50%?

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

PostPosted: 09 Mar 2018, 06:31
by heliumdream
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

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

PostPosted: 14 Mar 2018, 18:14
by ahkren
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.