kumoricon / kumoreg

Attendee management and badge printing system
MIT License
1 stars 2 forks source link

Badge name sizing #52

Closed micahcowan closed 8 years ago

micahcowan commented 8 years ago

Fixes #43.

Caveats/Notes: Feature is added directly to FullBadgePrintFormatter, as a private method and class, and is thus currently unavailable to other implementations (such as LiteBadgePrintFormatter).

The + xOffset and + yOffset peppered everywhere has been replaced by a single line towards the top that just uses them to adjust the page's transformation matrix.

attendee.getBadgeName() is now also checked to see if it consists of nothing but whitespace (there was some test data from test.csv that contained non-NULL empty strings for badgeName, which produced undesirable formatting.

Care should be taken to adjust the resizeOpt.maxTextWidth value as appropriate when formatting changes are made to the badge code (especially wrt width). It's advisable to make sure and test oversized names against new badge formats.

Now that the badge name's font size can shrink, there are some combinations of badge name and real name that can be around the same size. Might want to consider some additional ways to typographically contrast the two names so it's clearer what's what.

jashort commented 8 years ago

There was a NullPointerException in FullBadgePrintFormatter line 135 when badgeName is null - just fixed that before merging (if this new feature on GitHub works). Looks awesome! Now John Jacob Jingleheimer Schmidt can get a badge with his name on it. :+1:

micahcowan commented 8 years ago

Good catch! And awesome feature (though I suspect the default "allow" setting is going to end up disgruntling someone somewhere) ;)

jashort commented 8 years ago

Yeah, I was impressed. Crazy thing actually worked better than I expected, I like that it added another commit instead of just changing the file inline (which would be kind of terrible. :) )