Skip to content

Properly implement ideographic baseline  #22625

Open

Description

@GaryQian

Currently, ideographic baseline is implemented as:
(paragraph.cc)

ideographic_baseline_ =
         (metrics.fUnderlinePosition - metrics.fAscent) * style.height;

This appears to be incorrect and was only meant to be a stand-in that was mostly correct for most cases.

We should try to sort this out as it particularly impacts China.

Activity

  1. added
    engineflutter/engine related. See also e: labels.
    a: chinaChina and its Great Firewall
    a: typographyText rendering, possibly libtxt
    on Oct 3, 2018
  2. GaryQian commented on Oct 3, 2018

    @GaryQian
    ContributorAuthor

    I suspect #19063 may be caused by this, although Flutter does not seem to be currently using the ideographic baseline yet.

  3. GaryQian commented on Oct 3, 2018

    @GaryQian
    ContributorAuthor

    cc @jason-simmons @chinmaygarde
    Any idea how the existing spec(s) define(s) ideographic baseline as numerically? The resources I found seem to be rather vague about exactly what it is.

    Different specs across the web define it either generically or in terms of each other (eg, w3 does whatever css does whatever opentype and so on)

  4. self-assigned this
    on Oct 3, 2018
  5. GaryQian commented on Oct 3, 2018

    @GaryQian
    ContributorAuthor
  6. GaryQian commented on Oct 4, 2018

    @GaryQian
    ContributorAuthor

    https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-textbaseline
    defines the ideographic baseline differently than CSS and OpenType, where the ideographic baseline is not equivalent to the bottom of the EM square.

  7. GaryQian commented on Oct 4, 2018

    @GaryQian
    ContributorAuthor

    Rolled into Flutter by 00bcffd

  8. GaryQian commented on Jul 3, 2019

    @GaryQian
    ContributorAuthor

    It seems that what we have is still not correct.

  9. added this to the milestone on Dec 18, 2019
  10. removed their assignment
    on Mar 18, 2020
  11. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  12. removed this from the milestone on Aug 17, 2020
  13. fzyzcjy commented on Jan 16, 2022

    @fzyzcjy
    Contributor

    Hi is there any updates? (problem here: #96713)

  14. LongCatIsLooong commented on Apr 23, 2026

    @LongCatIsLooong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: chinaChina and its Great Firewalla: typographyText rendering, possibly libtxtengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions