如何确定使用哪个字体文件,而不仅仅是字体系列?

Dan*_* T. 9 css css3 font-face google-chrome-devtools

假设我有以下字体外观定义:

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/open-sans.regular.woff") format("woff");
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300;
  src: url('../fonts/open-sans.light.woff') format('woff');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/open-sans.semibold.woff') format('woff');
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/open-sans.bold.woff') format('woff');
}
Run Code Online (Sandbox Code Playgroud)

在Chrome的开发工具中,我可以分辨出正在使用的字体系列:

在此输入图像描述

但有没有办法告诉使用哪个特定的字体文件?我正在尝试验证浏览器实际上是使用字体的粗体版本,例如,而不是在常规版本的字体上执行自己的"假"粗体.

小智 6

在 Chrome 中,无法知道加载了哪个字体文件,但您可以通过查看“计算”选项卡中的“渲染字体”,然后检查“应用程序”选项卡中的字体文件名称来获得良好的提示

检查渲染字体:

检查渲染字体

检查字体文件名: 检查字体文件名


Dan*_* T. 5

为了回答我自己的问题,Nikul Khatik给出了正确的答案。Chrome开发者工具不支持此功能,但Firefox的支持:

在此处输入图片说明 因此,使用Firefox获取用于元素的实际字体。