@alcinnz@floss.social
@alcinnz@floss.social avatar

alcinnz

@alcinnz@floss.social

A browser developer posting mostly about how free software projects work, and occasionally about climate change.

Though I do enjoy german board games given an opponent.

Pronouns: he/him

This profile is from a federated server and may be incomplete. Browse more on the original instance.

alcinnz, to random
@alcinnz@floss.social avatar

This morning I'm skimming over the rest of LibPopplers core library & describing what I missed in using the pdftohtml command as a guide in studying it.

Which includes:

  • Parsed & binary searched Unicode Mapping tables, used in various Output Devs & the Global Params.
  • Various dataheaders, especially related to Unicode & builtin fonts. May be paired with lookup routines.
  • Convert between UTF8, UTF16, & UCS4.
  • UTF8-handling utils.
  • Parsed viewer preferences.

1/2?

alcinnz,
@alcinnz@floss.social avatar
  • Parsed sounds; used by links, annotations, & embedding frameworks.
  • Stream base-class & various subclasses.
  • Catalogs include a dynamically-typed tree structure.
  • An OutputDev which extracts rearranged & decoded text from a PDF file, much harder than it needs to be!
  • Key-value caches used in graphics & cross-reference.
  • An OutputDev which strips away degenerate PDF data.
  • An OutputDev outputting PostScript files utilizing an extra prolog.

2/3!

alcinnz,
@alcinnz@floss.social avatar
  • Parsed parameters for media playback, used by internal links.
  • Parsed PageTransitions, called by embedders.
  • Parsed Movies & their activation parameters, called by embedders.
  • Lookup character names, called by Global Parameters.
  • Stream subclasses to help decode JPEG images.
  • Log info on link-triggered JS.
  • An OutputDev extracting your annotations.
  • Utils for embedding images, used by the PDFDoc class itself.
  • Decode compact arithmetic instructions, used by JPG decoding.

3/4!!

alcinnz,
@alcinnz@floss.social avatar
  • Python script for generating Unicode dataheaders.
  • General logic for parsing out files (fonts, images, video, audio) embedded in the PDF)
  • Filepath parsing.
  • ZLib compression, used by PostScript & the PDF doc itself. With a Stream subclass.
  • Parsed FontInfo, used by Text Output & the global params.
  • Loading PDFs via LibCURL
  • Reading & writing dates.
  • Discrete Cosine Transformation streams.
  • Hashmaps & arrays.
  • "Distinguished name" parsing, used by cryptography.

4/4.5!!

alcinnz,
@alcinnz@floss.social avatar
  • Error reporting.
  • Gathering font metrics, used by Forms.
  • Parsing char maps; used by graphics, global params, & text extraction.
  • An Output Dev for computing the bbox.
  • OutputDev hooking LibPoppler up to LibCairo Vector Graphics, with box rescaling util.

And I think that pretty much covers everything else in LibPoppler's core library!

4.5/4.5! Fin for today! Tomorrow: LibSplash! Amongst its vendored libs.

alcinnz, to random
@alcinnz@floss.social avatar

Finished skimming OpenSSL, I don't see anything else in it I want to study in-depth!

Downloading kmod...

alcinnz, to random
@alcinnz@floss.social avatar

Can you detect overflow with CSS? - "The Cascade":
https://www.csscade.com/can-you-detect-overflow-with-css

alcinnz, to random
@alcinnz@floss.social avatar
alcinnz, to random
@alcinnz@floss.social avatar

Weeknotes – series 07 episode 17 - Benjy Stanton:
https://www.benjystanton.co.uk/blog/weeknotes-series-07-episode-17/

alcinnz, to random
@alcinnz@floss.social avatar

Printing music with CSS Grid - Stephen Band "Cruncher":
https://cruncher.ch/blog/printing-music-with-css-grid/

alcinnz, to random
@alcinnz@floss.social avatar

A to Z of Assistive Technology for Reading Digital Text - Veroniiiica:
https://veroniiiica.com/a-to-z-of-assistive-technology-for-reading/

alcinnz, to random
@alcinnz@floss.social avatar

How Do I Prepare My Phone for a Protest? (Updated 2024) - Dan Phiffer, Tomas Apodaca, Miles Hilton, & Maddy Varner @ The Markup:
https://themarkup.org/the-breakdown/2024/05/04/how-do-i-prepare-my-phone-for-a-protest-updated-2024

I must emphasise: Simplest & safest guide to bringing phones to protests: Don't!

If you want to take photos use a dedicated camera.

alcinnz, to random
@alcinnz@floss.social avatar

Visualizing The Finish Line - elementary OS:
https://blog.elementary.io/updates-for-may-2024/

18+ Seirdy, to random
@Seirdy@pleroma.envs.net avatar

I just remembered that fonts can contain webassembly shaping instructions now. Supported in Harfbuzz.

Before you panic, remember that font engines already support significant parts of the SVG spec and extremely advanced shaping/hinting instructions (the latter of which are basically their own programming language).

I’m not saying you shouldn’t panic. I’m saying that you should also be aware of that before you do.

alcinnz,
@alcinnz@floss.social avatar

@Seirdy I noticed this...

alcinnz, to random
@alcinnz@floss.social avatar

Brainstorming puzzle for you devs:

As a computer boots up we often want it to offer hardware configuration & testing tools. What's the simplest yet most capable infrastructure we could build for those tools to offer a UI?

Would the answer change much for the hypothetical hardware I've been exploring? Including:

  • A main processor specialized in parsing & reformatting strings
  • Sine wave generator
  • "Layout Coprocessor" which can perform running-sums (& other maths) on trees
  • Sprites
  • etc
alcinnz, to random
@alcinnz@floss.social avatar

Having discussed the challenge of text layout/rendering yesterday, & reboosted some jokes about it: What all is involved?

In GNOME's stack we use FontConfig to lookup fonts for a particular style, Pango to split lines, FriBidi to normalize text direction, LibICU to find split points, FreeType to parse fonts in a wide variety of formats, Harfbuzz to size runs of text positioning "glyphs" within it, & Cairo (or OpenGL) to composite those glyphs onscreen.

Doing the job properly is hard!

1/2?

alcinnz,
@alcinnz@floss.social avatar

In my hypothetical hardware I split the test between multiple circuits!

I described some preprocessing (including normalizing text dir) in a circuit well-suited to most text processing (parse & rearrange!). The same circuit would parse fonts.

I described a 2nd circuit to position text within the constraints of their containing blocks, fast at running-sums. And a 3rd for compositing results onscreen. Combine them to rasterize vectors.

Early IRL hardware only handled monospaced English!

2/2

alcinnz, to random
@alcinnz@floss.social avatar

Much of what you see in PDFs is text, rendered via some font. So how does PDF (specifically LibPoppler's implementation) handle fonts?

It gathers the fonts into a FontDict class (indexed presumably by numeric ID). With fonts themselves storing various textual names, Ref into the PDF file, weight & stretch (enums), the encoding, bitflags, transformation matrix, bbox, width for missing chars, ascent & descent dimensions, flags whether it can convert to/from Unicode, & flags validity.

1/2?

alcinnz,
@alcinnz@floss.social avatar

There's a couple subclasses for 8bit fonts or (incorporating geometry structs) character-ID fonts, both adding additional properties.

You can ask fonts for their location, returning an enum for whether the font's embedded, the font's encoding, Ref to the font in the file, filepath, ID in the fontfile, & a fallback font index.

The implementation is, beyond the usual heavy focus on parsing & accessors, implements set operations upon charsets & lookups of built-in fonts.

2/2.1!

alcinnz,
@alcinnz@floss.social avatar

This all wraps a vendored "FoFi" library I'll cover later, which presumably wraps FreeType. GPerf is used to speed up lookup of builtin fonts, which are spread across dataheaders.

2.1/2.1 Fin for today! Tomorrow: Skim over what I haven't covered! After that: The vendored libs!

alcinnz, to random
@alcinnz@floss.social avatar

From bytes to carbon savings: Immediate’s sustainable transformation of Good Food - Marketa Benisek @ Branch:
https://branch.climateaction.tech/issues/issue-8/immediates-transformation-of-good-food-website/

alcinnz, to random
@alcinnz@floss.social avatar

Popover API - The Cascade:
https://www.csscade.com/popover-api

alcinnz, to random
@alcinnz@floss.social avatar

Building a social network from scratch on a whiteboard - Xe:
https://xeiaso.net/talks/2024/shashin/

alcinnz, to random
@alcinnz@floss.social avatar

Mail Injection in PHP: Attacks and Prevention - Doğan Uçar:
https://www.dogan-ucar.de/mail-injection-in-php-attacks-and-prevention/ (has annoying popups)

alcinnz, to random
@alcinnz@floss.social avatar

P&B: Cory Dransfeldt - Manuel Moreale:
https://manuelmoreale.com/@/page/50aifxEnQNlrL4Kl

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • InstantRegret
  • magazineikmin
  • hgfsjryuu7
  • Durango
  • Youngstown
  • slotface
  • everett
  • ngwrru68w68
  • rosin
  • kavyap
  • mdbf
  • PowerRangers
  • DreamBathrooms
  • anitta
  • osvaldo12
  • thenastyranch
  • vwfavf
  • khanakhh
  • tacticalgear
  • cisconetworking
  • modclub
  • GTA5RPClips
  • ethstaker
  • cubers
  • normalnudes
  • tester
  • provamag3
  • All magazines