Further badge font size adjustments

Allow all of the free text to be rendered.
Shrink font size if more than 40 characters in free text line.
This commit is contained in:
Joel Addison 2020-01-07 21:04:14 +10:00
parent f89c4f9b2d
commit fe8515a1c3
2 changed files with 8 additions and 8 deletions

View file

@ -127,11 +127,11 @@
<text transform="translate(148 171.07)" font-size="14" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 171.07)" font-size="14" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}</tspan> <tspan letter-spacing="0em">{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}</tspan>
</text> </text>
<text transform="translate(148 205)" font-size="10" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 205)" font-size="{% if user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|length > 40 %}8{% else %}10{% endif %}" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|truncatechars:45 }}</tspan> <tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1 }}</tspan>
</text> </text>
<text transform="translate(148 230)" font-size="10" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 230)" font-size="{% if user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|length > 40 %}8{% else %}10{% endif %}" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|truncatechars:45 }}</tspan> <tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2 }}</tspan>
</text> </text>
<text transform="translate(148 362.4)" font-size="16" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 362.4)" font-size="16" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ ticket_type|upper }}</tspan> <tspan letter-spacing="0em">{{ ticket_type|upper }}</tspan>

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

@ -94,11 +94,11 @@
<text transform="translate(148 171.07)" font-size="14" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 171.07)" font-size="14" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}</tspan> <tspan letter-spacing="0em">{% if ticket_type == "Student" or ticket_type == "Hobbyist" or "Only" in ticket_type %}{% else %}{{ user.attendee.attendeeprofilebase.attendeeprofile.company }}{% endif %}</tspan>
</text> </text>
<text transform="translate(148 205)" font-size="10" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 205)" font-size="{% if user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|length > 40 %}8{% else %}10{% endif %}" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1|truncatechars:45 }}</tspan> <tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_1 }}</tspan>
</text> </text>
<text transform="translate(148 230)" font-size="10" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 230)" font-size="{% if user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|length > 40 %}8{% else %}10{% endif %}" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2|truncatechars:45 }}</tspan> <tspan letter-spacing="0em">{{ user.attendee.attendeeprofilebase.attendeeprofile.free_text_2 }}</tspan>
</text> </text>
<text transform="translate(148 362.4)" font-size="16" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle"> <text transform="translate(148 362.4)" font-size="16" fill="#231f20" font-family="SourceSansPro-Regular, Source Sans Pro" text-anchor="middle">
<tspan letter-spacing="0em">{{ ticket_type|upper }}</tspan> <tspan letter-spacing="0em">{{ ticket_type|upper }}</tspan>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB