<#macro br>

</#macro>
<#macro cutter full="false">

<#include "${escRoot}/cut_partial.hex">
</#macro>
<#macro buzzer>

<#include "${escRoot}/buzzer.hex">
</#macro>
<#macro drawer>

<#include "${escRoot}/drawer.hex">
</#macro>

<#macro fontTall>
    <#include "${escRoot}/font/tall.hex">
</#macro>
<#macro fontTallWide>
    <#include "${escRoot}/font/tall_and_wide.hex">
</#macro>
<#macro fontWide>
    <#include "${escRoot}/font/wide.hex">
</#macro>

<#macro fontBold>
<#include "${escRoot}/font/bold.hex">
</#macro>

<#macro fontUnderline>
<#include "${escRoot}/font/underline.hex">
</#macro>

<#macro fontReset>
<#include "${escRoot}/reset.hex">
</#macro>

<#macro styleS format="">
<#assign form=format?lower_case>
<#assign underline=form?contains("u")>
<#assign tall=form?contains("t")>
<#assign bold=form?contains("b")>
<#assign wide=form?contains("w")>
<#if underline || tall || bold || wide>
    <#if tall && wide>
        <@fontTallWide/>
    <#else>
        <#if !tall && !wide>
            <@fontReset/>
        <#else>
            <#if tall><@fontTall/></#if>
            <#if wide><@fontWide/></#if>
        </#if>
    </#if>
    <#if bold><@fontBold/></#if>
    <#if underline><@fontUnderline/></#if>
</#if>
</#macro>

<#macro styleE format="">
<#assign form=format?lower_case>
<#assign underline=form?contains("u")>
<#assign tall=form?contains("t")>
<#assign bold=form?contains("b")>
<#assign wide=form?contains("w")>
<#if underline || tall || bold || wide>
    <@fontReset/>
</#if>
</#macro>

<#macro centered text chars=lw fill=" " format="">
<#assign contentsize=text?length >
<#assign distribute= chars?number - contentsize>
<#assign leftspaces=distribute / 2>
<#assign leftspaces=leftspaces?round>
<#assign rightspaces=distribute-leftspaces>
<#assign paddedleft=text?left_pad(leftspaces + contentsize, fill)>
<#assign result=paddedleft?right_pad( chars?number , fill)>
<@styleS format="${format}"/>${result}<@styleE format="${format}"/>
</#macro>

<#macro leftalign text chars=lw fill=" " format="">
<#assign result=text?right_pad(chars?number, fill)>
<@styleS format="${format}"/>${result}<@styleE format="${format}"/>
</#macro>

<#macro rightalign text chars=lw fill=" " format="">
<#assign result=text?left_pad(chars?number, fill)>
<@styleS format="${format}"/>${result}<@styleE format="${format}"/>
</#macro>

<#macro productline leftpart rightpart rightsize=10 format="" chars=lw fill=" ">
<#assign leftsize=(chars-rightsize-1)>
<#assign leftText=leftpart?right_pad(leftsize, fill)>
<#assign rightText=rightpart?left_pad(rightsize, fill)>
<@styleS format="${format}"/>${leftText} ${rightText}<@styleE format="${format}"/>
</#macro>

<#macro printqr text>
<#include "${escRoot}/qr/qr_1_choose_model.hex">
<#include "${escRoot}/qr/qr_2_set_size.hex">
<#include "${escRoot}/qr/qr_3_set_err_crc.hex">
<#assign text124=text?right_pad(124," ")><#-- text should be 3 bytes smaller than the dimension declared in qr_4_store_rigid_7F_00 (default 127 bytes)-->
<#include "${escRoot}/qr/qr_4_store_rigid_7F_00.hex">${text124}<#include "${escRoot}/qr/qr_6_print.hex">
</#macro>
