Added check for isInEditMode() so the font widgets can be rendered within AndroidStudio layout preview without errors.