New issue
Advanced search Search tips

Issue 770893 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 17
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug
Proj-VR
Proj-XR

Blocking:
issue 910748



Sign in to add a comment

Font fallback for VR doesn't work on Windows

Project Member Reported by billorr@chromium.org, Oct 2 2017

Issue description

Currently FontSupportsChar returns true regardless of the underlying font or character.  This should change to call platform APIs to actually determine fallbacks.

The corresponding unit test is disabled on Windows as well.
 
Labels: OS-Windows
Labels: VR-Desktop
Status: Available (was: Untriaged)
Bill, are we still using the VR-Desktop label, or OS=Windows instead?
Blocking: 773882
See also issue 731894.
Labels: -Pri-3 Pri-1
Labels: VR-Desktop-UI
Can we use gfx's font fallback code that exists on Windows already?

Do we even need to do anything?  My understanding is that direct write will automatically do font fallback.

As for testing, we could render text with different characters (like WillNotFailOnNonAsciiURLs) on Windows, and see that they render correctly.


It looks like Windows has an implementation for gfx::GetFallbackFonts() that will be used, so we'll get font fallbacks for free.

That said, we don't have a good way to detect invalid code points on Windows from VR code to bail out of VR.  I'll follow up with spec/PRD to see how we should handle this - for the initial strings, I think we could be ok - the string doesn't contain any security implications.

If we want to enable browsing or display URLs in a way that there are security implications if we can't display things correctly, we'll need to do work to detect them.  GetFallbackFont can be called for each character in a string to see if there are valid fallback fonts or missing glyphs.
Blocking: -773882 910748
Owner: billorr@chromium.org
Status: Started (was: Available)
in cr.
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16d659bed5f91f6e9b020fb0c052e1e5eef39530

commit 16d659bed5f91f6e9b020fb0c052e1e5eef39530
Author: Bill Orr <billorr@chromium.org>
Date: Tue Jan 08 07:33:26 2019

Support font fallback on Windows and Linux for VR

Both of these operating systems already have a nontrivial implementation of
gfx::GetFallbackFont and gfx::GetFallbackFonts.  These are already used when
fonts are rendered.  However, we need to hook up an implementation to sometimes
detect when a character is missing a glyph.

Finally, the WillNotFailOnNonAsciiURLs test can be enabled on Windows.

BUG= 770893 

Change-Id: Ie0f71020ae1b473f40fa43e5e660c9617b307a7e
Reviewed-on: https://chromium-review.googlesource.com/c/1345419
Commit-Queue: Bill Orr <billorr@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620645}
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/BUILD.gn
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/elements/text.cc
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/elements/url_text_unittest.cc
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/font_fallback.cc
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/font_fallback.h
[add] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/font_fallback_android.cc
[add] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/font_fallback_linux.cc
[add] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/font_fallback_win.cc
[modify] https://crrev.com/16d659bed5f91f6e9b020fb0c052e1e5eef39530/chrome/browser/vr/testapp/vr_test_context.cc

Comment 12 by samdrazin@chromium.org, Jan 17 (6 days ago)

Components: -UI>Browser>VR Blink>WebXR
Not a VRB issue. 

Comment 13 by billorr@chromium.org, Jan 17 (6 days ago)

Status: Fixed (was: Started)

Sign in to add a comment