Appendix E. Center Overlay (Feature 50) Support

The feature 50 (center overlay) is introduced in version 5.3. This feature allows users to specify a pattern string in the input to construct a pattern in the center of the QR code. It supports two syntaxes:

  • ~50[rows,cols,pattern]. For example ~50[7,7,007c6c446c7c]

  • ~50[:keyword]. Currently the encoder supports only one keyword: swiss7. Using :swiss7 allows user to constructs a compliant Swiss payment QR Code.

E.1. Specify bit pattern

The first method to use the feature is to specify the exact bit pattern of overlaid image. The string format is rows, cols, pattern.

To get the bit string, first convert all black pixels to 1 and white to 0. Each row must end at byte boundary with 0s appended. Convert 4 bits into a hexadecimal character (0-9, a-f). Trailing zeros can be omitted.

The image below has 7 pixels per row so add 0 to make it 8 bits per row. Convert the bits to hexadecimal value we get the string 007c6c446c7c00. Because the encoder knows the number of rows and columns from preceding parameter, the trailing zeros can be omitted. Therefore, both 007c6c446c7c00 and 007c6c446c7c are valid.

E.1.1. Limitations

In the center overlay pattern each unit has identical width and height, which are equal to the module width of the QR code (X dimension). Therefore, not all bitmaps can be implemented in this way while maintaining its size. Generally speaking, you can only implement simple bitmaps in this way, unless the QR code has a large size.

E.2. Swiss Payment QR Code

The current Swiss payment standard requires the QR code to have a fixed size at 46 mm with a 7 x 7 mm swiss logo overlaid at the center. To implement such a QR code, you will need to come up different pattern strings for each QR code size. The keyword syntax greatly reduces the work; as all you need is to insert ~50[:swiss7] in the data encoded, and choose the appropriate font and font size. Internally the encoder engine selects an overlay string automatically based on the final size of the QR Code.


The minimum Version to overlay a swiss logo is 6. If the version requested is less than 6, the engine will increase it to 6. If the version requested is less than 6 and the modifier byte forbids the increase, an error is returned.

E.2.1. Font and Font Size

You can use the MRV QRCode font to produce the Swiss payment barcode. However you need to set the font size accordingly based on the Version of the symbol in order to achieve the required 46 mm x 46 mm size. The table below calculate the font size.

Table E.1. QRCode Font and Size Selection

VersionNo. of ModulesModule width (mm)FontFont Size
6411.12MRV QRCode12.72
7451.02MRV QRCode11.59
8490.94MRV QRCode10.64
9530.87MRV QRCode9.84
10570.80MRV QRCode9.15
11610.75MRV QRCode8.55
12650.70MRV QRCode8.02
13690.67MRV QRCode7.56
14730.63MRV QRCode7.14
15770.60MRV QRCode6.77
16810.57MRV QRCode6.44
17850.54MRV QRCode6.14
18890.52MRV QRCode5.86
19930.49MRV QRCode5.61
20970.47MRV QRCode5.38
211010.45MRV QRCode5.16
221050.44MRV QRCode4.97

Many software do not allow fractional font sizes. To work around the issue, version 5.3 release includes a series of true type fonts that produce the same results at 12 points. The font name is MRV QRCode-SwissN, where N is the version number. For example, font MRV QRCode-Swiss20 is designed to format a Version 20 QR Code, and the ended symbol has a size of 46mm x 46mm.

Note that those accuracy fonts are not installed by default. In order to install the fonts into the system, run the installer and select feature "Fonts for Swiss Payment". You can install each font individually.

Table E.2. Swiss Font and Size Selection

VersionNo. of ModulesModule width (mm)FontFont Size
6411.12MRV QRCode-Swiss612
7451.02MRV QRCode-Swiss712
8490.94MRV QRCode-Swiss812
9530.87MRV QRCode-Swiss912
10570.80MRV QRCode-Swiss1012
11610.75MRV QRCode-Swiss1112
12650.70MRV QRCode-Swiss1212
13690.67MRV QRCode-Swiss1312
14730.63MRV QRCode-Swiss1412
15770.60MRV QRCode-Swiss1512
16810.57MRV QRCode-Swiss1612
17850.54MRV QRCode-Swiss1712
18890.52MRV QRCode-Swiss1812
19930.49MRV QRCode-Swiss1912
20970.47MRV QRCode-Swiss2012
211010.45MRV QRCode-Swiss2112
221050.44MRV QRCode-Swiss2212