Make it an error to include non-top-level headers Users should #include <hb.h> (or hb-ft.h, hb-glib.h, etc), but never things like hb-shape.h directly. This makes it easier to refactor headers later on without breaking compatibility.
diff --git a/src/hb-unicode.h b/src/hb-unicode.h index 13886df..205e4c7 100644 --- a/src/hb-unicode.h +++ b/src/hb-unicode.h
@@ -28,6 +28,10 @@ * Google Author(s): Behdad Esfahbod */ +#ifndef HB_H_IN +#error "Include <hb.h> instead." +#endif + #ifndef HB_UNICODE_H #define HB_UNICODE_H