  We perform a consistent reduction of 6d matter-coupled F(4) supergravity on a
compact Riemann surface $\Sigma_\mathfrak{g}$ of genus $\mathfrak{g}$, at the
level of the bosonic action. The result is an $\mathcal{N}=2$ gauged
supergravity coupled to two vector multiplets and a single hypermultiplet. The
four-dimensional model is holographically dual to the 3d superconformal field
theories of class $\mathcal{F}$, describing different brane systems in massive
type IIA and IIB wrapped on $\Sigma_\mathfrak{g}$. The naive reduction leads to
a non-standard 4d mixed duality frame with both electric and magnetic gauge
fields, as well as a massive tensor, that can be only described in the
embedding tensor formalism. Upon a chain of electromagnetic dualities, we are
able to determine the scalar manifolds and electric gaugings that uniquely
specify the model in the standard supergravity frame. We then use the result to
construct the first examples of static dyonic black holes in AdS$_6$ and
perform a microscopic counting of their entropy via the 5d topologically
twisted index. Finally, we show the existence of further subtruncations to the
massless sector of the 4d theory, such as the Fayet-Iliopoulos gauged $T^3$
model and minimal gauged supergravity. We are in turn able to find new
asymptotically AdS$_4$ solutions, providing predictions for the squashed $S^3$
partition functions and the superconformal and refined twisted indices of class
$\mathcal{F}$ theories.
