--- src/frontends/qt4/GuiFontMetrics.cpp
+++ src/frontends/qt4/GuiFontMetrics.cpp	2024-08-30 20:05:29.000000000 +0800
@@ -122,6 +122,8 @@
 	  breakat_cache_(cache_metrics_breakat_size),
 	  qtextlayout_cache_(cache_metrics_qtextlayout_size)
 {
+// For w/e reason QRawFont is not recognized, despite its header being included.
+#ifndef __APPLE__
 	// Determine italic slope
 	double const defaultSlope = tan(qDegreesToRadians(19.0));
 	QRawFont raw = QRawFont::fromFont(font);
@@ -137,6 +139,7 @@
 		slope_ = -tan(qDegreesToRadians(angle));
 		LYXERR(Debug::FONT, "Italic slope: " << slope_);
 	}
+#endif
 }
 
 
