[HN Gopher] Advanced text features and PDF
       ___________________________________________________________________
        
       Advanced text features and PDF
        
       Author : ingve
       Score  : 53 points
       Date   : 2024-06-21 12:22 UTC (10 hours ago)
        
 (HTM) web link (nibblestew.blogspot.com)
 (TXT) w3m dump (nibblestew.blogspot.com)
        
       | TRiG_Ireland wrote:
       | PDF was originally designed for printers, wasn't it? So making it
       | accessible to screen readers is tricky.
        
       | BossingAround wrote:
       | Do people actually like ligatures? I tried it with the IntelliJ
       | font and I could just not get used to it. Maybe because I'm
       | slightly dyslexic, but boy, it almost felt like the code I was
       | reading was in a different language.
       | 
       | Ligatures might look beautiful, but my brain just says "nope, I
       | don't know this symbol" and refuses to process it in a meaningful
       | way.
        
         | phren0logy wrote:
         | Perhaps any amount of ligatures is too much for some to read
         | easily, but I appreciate it when they fix collisions.
         | 
         | https://practicaltypography.com/ligatures.html
        
           | philsnow wrote:
           | I have                 font-variant-ligatures: none
           | !important;       font-feature-settings: "liga" off
           | !important;
           | 
           | in my userContent.css, so I had to stare at the three
           | examples for too long because the second and third looked
           | identical to me. After disabling the rules, I can see what
           | they're going for.
           | 
           | I have those rules in my userContent.css because I get livid
           | when I see ligatures in a fixed-width font (often, but not
           | always, code blocks) where for instance the 'fi' ligature
           | takes up one horizontal space. I don't know enough about css,
           | maybe there is a way to specify that I want to disable them
           | only in contexts where the font is fixed-width?
           | 
           |  _edit: [0] seems to say that this is not possible with plain
           | CSS / userContent.css
           | 
           | [0] https://stackoverflow.com/a/77367843 _
        
         | Rygian wrote:
         | I love the ones I don't even notice.
         | 
         | Ligatures in fixed-width fonts are almost always an aberration,
         | on the other hand.
        
       | tln wrote:
       | > Unfortunately the way things are set up means that you can only
       | specify horizontal kerning when laying out horizontal text and
       | vertical kerning for vertical text. If your script requires both,
       | you are not going to have a good time.
       | 
       | The Ts operator (sets text rise, ie changes the baseline) could
       | be useful here. Text selection in PDF readers may even treat text
       | with different text rise as being on the same line.
       | 
       | > We could specify kerning manually with a custom translation
       | matrix that translates the rendering location by the amount
       | needed. There are two main downsides to this. First of all it
       | would mean that instead of having a stream of glyphs to render,
       | you'd need to define 9 floating point numbers (actually 6 due to
       | reasons) between every pair of glyphs.
       | 
       | Or use Td... 2 numbers.
        
       ___________________________________________________________________
       (page generated 2024-06-21 23:01 UTC)