It sounds like you're looking to make your FancyMenu layouts scale dynamically across different screen ratios and GUI scales. This is a common goal!
However, I noticed you mentioned "1.12.2" as your Minecraft version. FancyMenu v3, which is the version this documentation covers and officially supports, is not compatible with Minecraft 1.12.2. FancyMenu v3 is designed for modern Minecraft versions (1.18.2+).
I highly recommend updating to a modern version of Minecraft and using FancyMenu v3 for the best experience and full access to its features for dynamic scaling. Unfortunately, I cannot provide support for older, unsupported Minecraft versions with FancyMenu.