View Issue Details

IDProjectCategoryView StatusLast Update
0006454Talermerchant backendpublic2024-01-12 13:04
ReporterFlorian Dold Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.8Fixed in Version0.8 
Summary0006454: generate SVG for QR code in merchant backend
DescriptionRIght now, the /orders/{order_id} HTML page doesn't show a QR code, but instead displays a unicode approximation that doesn't render nicely on some browsers.
TagsNo tags attached.
Attached Files

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2020-08-02 21:28

manager   ~0016541

Do we still want to do this? I think the ASCII-based QR code is good enough (or even better) than SVG.

Florian Dold

2020-08-03 07:23

manager   ~0016545

It doesn't display well in my browser at all, see the attached screenshot.

(Even worse, the jumbled QR code *pulsates* due to some size adjustments made by the browser when the page is reloaded.)
qr.png (97,622 bytes)   
qr.png (97,622 bytes)   

Christian Grothoff

2020-08-03 07:28

manager   ~0016546

Hmm. That looks like a font issue. As for pulsating, I did put in some code to 'zoom' the QR code if you go over it with the mouse. That is not what you mean?

Florian Dold

2020-08-03 07:30

manager   ~0016547

Yes, that actually explains the pulsating.

These font issues will be unavoidable. Are there any arguments against using SVGs?

Christian Grothoff

2020-08-03 07:37

manager   ~0016548

If we can find a way to fix the font issue, SVGs just make the page larger and add avoidable complexity to the C logic. The current code is very readable. Not to mention you have already plenty on your plate. Which browser are you using?

Florian Dold

2020-08-03 09:06

manager   ~0016549

I'm using Chromium 84.0.4147.

I'm not sure if we can fix the font issues reliably, as there are other variables, such as the browser's zoom setting or accessibility settings to make all fonts larger. It's much easier to precisely control the rendering of SVGs.

Christian Grothoff

2020-08-03 09:54

manager   ~0016550

It works fine with my Chromium 83.0.4103.116. And I've tried with various zoom settings / font enlargements, that works fine (FF and Chromium).

I suspect your browser has trouble with:
.qrtext {
    width: max-content;
    margin: auto;
    transition: font-size 0.2s;
    font-family: 'Lucida Console', Monaco, monospace;
    font-size: 0.5em;
}
and there specifically the font-family. I certainly never installed extra fonts, but this is still what I think we should investigate first. Maybe there is an easy fix that makes this work virtually everywhere?

Christian Grothoff

2020-08-03 10:04

manager   ~0016551

Hmm. The font-family is a "Web safe font" (aka: should be pre-installed everywhere). Also, I get your image ONLY if while I mess up the CSS syntax in that line and end up with a non-monospace font. Could it be that somehow you are not grabbing our CSS in full? Note that we (currently) "inline" the pure-min.css from a 3rd party site, which is likely broken on the backend.taler.net installation (this is on my list of things to fix).

Florian Dold

2020-08-03 10:22

manager   ~0016552

When I manually remove the "text-align: center" on the "<div class="qr">" (why is that there?), I still get a broken result. See the dev tools for the actual CSS properties the browser loaded. I even manually changed the font selection to *only* monospace, still won't display properly.

I suspect the width of a non-breaking white space character is simply different from the unicode black box character.

And I was actually be able to confirm this: When I ask the dev tools, it tells me that the QR code div is using a combination of two "physical" fonts:

Droid Sans Mono—Local file(1988 glyphs)
Tinos—Local file(1702 glyphs)

=> We should use SVGs, as the merchant must work on systems that have *way* more broken font configurations than mine ;-)
qr3.png (139,703 bytes)   
qr3.png (139,703 bytes)   

Christian Grothoff

2020-08-03 10:26

manager   ~0016553

Ok. Well, the code is (now) in taler-merchant-httpd_qr.c now, should be trivial to find for you.

Florian Dold

2020-08-06 16:55

manager   ~0016564

Implemented in b4fd96d2.

Florian Dold

2021-09-02 16:23

manager   ~0018374

Fix committed to master branch.

Issue History

Date ModifiedUsernameFieldChange
2020-07-31 17:42Florian DoldNew Issue
2020-07-31 17:42Florian DoldStatusnew => assigned
2020-07-31 17:42Florian DoldAssigned To => Florian Dold
2020-08-02 21:28Christian GrothoffNote Added: 0016541
2020-08-02 21:28Christian GrothoffStatusassigned => feedback
2020-08-03 07:23Florian DoldFile Added: qr.png
2020-08-03 07:23Florian DoldNote Added: 0016545
2020-08-03 07:28Christian GrothoffNote Added: 0016546
2020-08-03 07:30Florian DoldNote Added: 0016547
2020-08-03 07:37Christian GrothoffNote Added: 0016548
2020-08-03 09:06Florian DoldNote Added: 0016549
2020-08-03 09:54Christian GrothoffNote Added: 0016550
2020-08-03 10:04Christian GrothoffNote Added: 0016551
2020-08-03 10:22Florian DoldFile Added: qr3.png
2020-08-03 10:22Florian DoldNote Added: 0016552
2020-08-03 10:26Christian GrothoffNote Added: 0016553
2020-08-06 16:55Florian DoldStatusfeedback => informing
2020-08-06 16:55Florian DoldResolutionopen => fixed
2020-08-06 16:55Florian DoldFixed in Version => 0.8
2020-08-06 16:55Florian DoldNote Added: 0016564
2020-08-06 23:44Christian GrothoffTarget Version => 0.8
2021-08-24 14:23Christian GrothoffStatusinforming => closed
2021-09-02 16:22Florian Dold
2021-09-02 16:23Florian DoldNote Added: 0018374
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend