@Override
  protected @Nullable FontFamilyDescriptor getDescriptorByFontImpl(@NotNull Font font) {
    if (!isSupportedImpl()) return null;
    if (GET_FONT_2D_METHOD == null || GET_TYPO_FAMILY_METHOD == null || GET_TYPO_SUBFAMILY_METHOD == null || GET_WEIGHT_METHOD == null) {
      return null;
    }

    try {
      Font2D font2D = (Font2D)GET_FONT_2D_METHOD.invoke(font);
      String fontName = font.getName();
      String font2DName = font2D.getFontName(null);
      if (isUnsupportedFont(fontName, font2DName)) return null;

      String family = (String)GET_TYPO_FAMILY_METHOD.invoke(font2D);
      String subfamily = (String)GET_TYPO_SUBFAMILY_METHOD.invoke(font2D);

      FontFamilyDescriptor descriptor = new FontFamilyDescriptor(family, subfamily);
      if (getFontByDescriptorImpl(descriptor) == null) return null;

      return descriptor;
    }
    catch (Throwable e) {
      LOG.warn(e);
      return null;
    }
  }
@Override
  protected @Nullable FontFamilyDescriptor getDescriptorByFontImpl(@NotNull Font font)