活动按钮的图像类型

Image Types for Active Buttons

推荐的工具栏按钮图像类型是什么?当相关面板处于活动状态时,我想将工具栏按钮颜色更改为 'active' 颜色。类似于模型浏览器按钮的工作方式。我试过 png 和 svg 但没有成功,如下图所示:

Autodesk 似乎正在使用自定义字体库。还将研究生成自定义字体库。

查看器工具栏图标的附加信息,它们由自定义字体格式制成 - WOFF(Web Open Font Format) with my finding and just like the Font Awesome and Bootstrap Glyphicons。您可以在 style.css

中看到如下配置
@font-face {
  font-family: 'forge-viewer-font';
  src: url('data:application/font-woff;base64string...') format('woff');
  font-weight: normal;
  font-style: normal;
}

[class^="adsk-icon-"]:before,
[class*=" adsk-icon-"]:before {
  font-family: "forge-viewer-font" !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  // .... other configs
}

.adsk-icon-arrow:before {
    content: "a";
}

A字符代表查看器移动工具的箭头图标:

在为 Web 应用程序创建图标之前,您必须将它们转换为 SVG 格式,然后使用一些工具,例如 Glyphs, IcoMoon, and etc. to convert icons into WOFF format. Afterward, create CSS styles for icon configs showing as the above. To simplify the workflow, I personally prefer to use the IcoMoon 创建我自己的图标,它会创建所有需要的文件(例如 WOFF,CSS, ..., 等等) 在点击 "Generate Fonts".

时自动

希望对你有帮助~