9 comments

  • lovich0 minutes ago
    How did they get the exact effect to show what they want in the text here instead of say, me seeing the exact same visuals for each browser as I am reading it from a single browser?
  • Karliss1 hour ago
    Few more additional ones, more about editing than just rendering:<p>The style change mid ligature has a related problem. While it might be reasonable not to support style change in the middle of ligature, you still want to select individual letters within ligatures like &quot;ff&quot;, &quot;ffi&quot; and &quot;fl&quot;. The problem just like with color change is that neither the text shaper nor program rendering text knows where each individual letter within ligature glyph is positioned. Font simply lacks this information.<p>From what I have seen most programs which support it use similar approximation as what Firefox uses for coloring - split the ligature into equal parts. Works good enough for something like &quot;fi&quot;, &quot;fl&quot; not so much for some of ligatures within programming fonts that combine &gt;= into ≥.<p>There are even worse edge cases in scripts for other languages. There are ligatures which look roughly like the 2 characters which formed it side by side but in reverse order. There are also some ligatures in CJK fonts which combine 4 characters in a square.<p>Backspace erases characters at finer granularity than it&#x27;s possible to select them.<p>With regards to LTR&#x2F;RTL selection weirdness I recently discovered that some editors display small flag on the cursor displaying current position direction when it&#x27;s in mixed direction text.
  • gnabgib6 days ago
    (2019) Popular in:<p>2023 (290 points, 119 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36478892">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36478892</a><p>2022 (399 points, 154 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30330144">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30330144</a><p>2019 (542 points, 170 comments) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21105625">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21105625</a>
  • jesse__2 hours ago
    The ligatures part of this article gets me every time I re-read it. I think reading this article may have been the first time I realized that even large, well-funded projects are still done by people who are just regular humans, and sometimes settle for something that&#x27;s good enough.
  • tankenmate25 minutes ago
    Hmm I use Firefox and the rendering I see in Firefox looks nothing like the render the author gets in Firefox; in fact the text rendering I get looks very similar to the &quot;Chrome&quot; rendering. Obviously this must depend on the libraries linked during the build process.
    • Denvercoder94 minutes ago
      The article is from 2019, things might also simply have changed since then.
    • kg7 minutes ago
      Depending on your OS Firefox will select from multiple rendering backends based on your GPU, driver etc.<p>On Windows it may or may not be using DirectWrite for text rasterization as a general thing, and in some cases text might be rasterized using a different fallback path if DirectWrite can&#x27;t handle the font, I think.<p>IIRC this was&#x2F;is true for Chrome as well, where in some cases it software rasterizes text using Skia instead of calling through to the OS&#x27;s font implementation.
  • thot_experiment1 hour ago
    I&#x27;ve tried to ask this before in various contexts and I&#x27;ve never been able to find an answer but maybe commenters on a post like this would know.<p>I like the way that the CJK fonts render without anti-aliasing on windows. I want to know why and how to cause windows to render a non-cjk font of my choosing in this aliased style. I am not opposed to hex-editing or otherwise modifying the font if that&#x27;s necessary. I&#x27;ve never been able to find information bout the mechanism or how it&#x27;s triggered.
    • Permik1 hour ago
      Just disable ClearType and all your text will be uniform :)
  • xg151 hour ago
    &gt; <i>Don’t ask about the code which line-breaks partial ligatures though.</i><p>Wondered about this. All the circular dependencies sound like you could feasibly get some style&#x2F;layout combinations that lead to self-contradictory situations.<p>E.g. consider a ligature that&#x27;s wider than the characters&#x27; individual glyphs. If the ligature is at the end of the box, it could trigger a line break. But that line break would also break up the ligature and cause the characters to be rendered as individual glyphs, reducing their width - which would undo the line break. But without the line break, the ligature would reconnect, increase the width and restore the line break, etc etc...
  • socalgal21 hour ago
    And the companion article: <a href="https:&#x2F;&#x2F;lord.io&#x2F;text-editing-hates-you-too&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lord.io&#x2F;text-editing-hates-you-too&#x2F;</a><p>(posted in other other threads too)
  • casey250 minutes ago
    The real takeaway from the article is that you can rathole forever on ill-defined problems. Decide upfront whether you care about actual humans and their usecases or hypothetical humans and their hypothetical usecases.
    • PKop12 minutes ago
      Or even, which subset of humans&#x27; uses cases you wish to concern yourself with as you can&#x27;t always please everyone or tackle everyone&#x27;s problems. If one only cared about a single language everything becomes much easier.