Reconsider cairo_font_options_set_palette_index
I'm not sure how this api could be used.
All the other font options are really global 'context' things, and that is how e.g. pango treats them: you set the font options on the PangoContext, and then the same font options get used for every font used with that context.
But a palette_index is very specific to a particular font - another font may not have the same palettes, or no palettes at all, or have the light and dark palettes positions flipped...
What makes a lot more sense to have globally (and is much easier to provide for applications) is a 'prefer-light/prefer-dark' preference. I've played with that here: https://gitlab.gnome.org/GNOME/pango/-/commit/de2cf0afae7f5e488f54515b789665091a738c45
Unfortunately, the cairo_font_options_set_palette_index api is useless for that, so I have to transport the 'prefer-light/prefer-dark' preference through the pango plumbing in addition to the font options, and then override the palette_index when I get to the point where I can actually query the available palettes.