Fonts in browser textfields are wrong

Bug #1322456 reported by David Barth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Invalid
Undecided
Unassigned
Ubuntu UI Toolkit
Invalid
Undecided
Unassigned
webbrowser-app
Fix Released
High
Olivier Tilloy
qtubuntu (Ubuntu)
Invalid
Undecided
Unassigned
webbrowser-app (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It feels like we're using system fonts in textfields, where webfonts are expected on a number of websites now.

One example of that is the signon page for Google Apps, like Calendar.

Tags: rtm14

Related branches

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I suspect this bug is actually elsewhere in the platform. Oxide sets default font families in Chromium for various font styles (Sans / Sans Serif / Monospace) based on what QFont gives us, and these ultimately come from the QPA plugin. As we get the correct settings in Unity 7 desktop, there is probably something missing in Unity 8 that means we're setting undesirable default font families for each of these styles.

Revision history for this message
Bill Filler (bfiller) wrote :

sounds like we could be missing a font package(s) on the phone image?

tags: added: rtm14
summary: - Fonts in textfields are wrong
+ Fonts in browser textfields are wrong
Revision history for this message
Michał Sawicz (saviq) wrote :

Unity8 is a consumer of this as anything else. You're saying QPA, that would be lp:qtubuntu, lp:ubuntu-ui-toolkit might be involved as well.

no longer affects: unity8
Bill Filler (bfiller)
Changed in webbrowser-app:
importance: Undecided → High
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Interestingly, the font difference seems to happen only in input fields, the rest of the page (at least for google’s login page) is rendered fine.

Using the inspector in chromium, the computed font family for the text field is "Arial" (from the "html, body - Arial, sans-serif" CSS rule), the same as for the "Create an account" link at the bottom of the page, however they are rendered with different fonts.

Note that I’m seeing this only on a device, webbrowser-app on desktop doesn’t exhibit this problem.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I instrumented oxide’s WebPreferences constructor to print out the default font families returned by the Qt platform plugin, and the result is the same on desktop and device:

  standard font family: "DejaVu Serif"
  serif font family: "DejaVu Serif"
  sans-serif font family: "DejaVu Sans"
  fixed font family: "DejaVu Sans Mono"

So the problem lies elsewhere.

Revision history for this message
David Barth (dbarth) wrote : Re: [Bug 1322456] Re: Fonts in browser textfields are wrong

Le 13/06/2014 10:35, Olivier Tilloy a écrit :
> I instrumented oxide’s WebPreferences constructor to print out the
> default font families returned by the Qt platform plugin, and the result
> is the same on desktop and device:
>
> standard font family: "DejaVu Serif"
> serif font family: "DejaVu Serif"
> sans-serif font family: "DejaVu Sans"
> fixed font family: "DejaVu Sans Mono"
>
> So the problem lies elsewhere.
This is good information. Thanks for the report so far. This also seems
to confirm Chris's intuition about the problem being more on the Qt/SDK
side of things.

What are the QML/Qt components making the textfield entry?

David

Revision history for this message
Olivier Tilloy (osomon) wrote :

I don’t think that the problem is on the Qt/SDK side of things: font rendering in blink is not delegated to Qt.

Actually, I don’t think the problem is in the rendering itself, but rather in the font selection algorithm for certain types of elements. It seems the bug affects only <input type="text"> elements, other elements are rendered with the correct font.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I’m not able to reproduce the issue on device with the following test HTML page:

    <html>
     <body>
      <div style="font-family: Ubuntu">Ubuntu</div>
      <form>
       <input type="text" id="text" style="font-family: Ubuntu" placeholder="Ubuntu" />
      </form>
     </body>
    </html>

The font for the placeholder as well as the content input in the text box is correct.

I’m still unsure how that might explain what we’re seeing with the google login page though.

@all: are we seeing a similar issue on other pages/online forms?

Revision history for this message
Olivier Tilloy (osomon) wrote :

The default Arial font on the device is not the same as the font that is used to render the rest of the page.

Installing the fonts-liberation package on the device solves the issue.

Bill Filler (bfiller)
Changed in webbrowser-app:
milestone: none → ux-freeze
Olivier Tilloy (osomon)
Changed in webbrowser-app:
status: New → In Progress
Changed in qtubuntu:
status: New → Invalid
Changed in ubuntu-ui-toolkit:
status: New → Invalid
Changed in oxide:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.23+14.10.20140617-0ubuntu1

---------------
webbrowser-app (0.23+14.10.20140617-0ubuntu1) utopic; urgency=low

  [ Ugo Riboni ]
  * Update the application icon to the new suru theme. This applies to
    desktop only. The current mobile theme (ubuntu-mobile-icons) still
    ships the old icon. (LP: #1328147)

  [ Olivier Tilloy ]
  * debian/control: add fonts-liberation as a runtime dependency of
    webbrowser-app and webapp-container, for smoother rendering of
    webpages on devices. (LP: #1322456)
 -- Ubuntu daily release <email address hidden> Tue, 17 Jun 2014 08:58:37 +0000

Changed in webbrowser-app (Ubuntu):
status: New → Fix Released
Olivier Tilloy (osomon)
Changed in webbrowser-app:
status: In Progress → Fix Released
Michał Sawicz (saviq)
affects: qtubuntu → qtubuntu (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.