简体   繁体   English

MetricsGetter.GetTextWidth 的定义在哪里

[英]Where is the definition of MetricsGetter.GetTextWidth

I am trying to use the Open-XML-Powertools .我正在尝试使用Open-XML-Powertools

I have downloaded the current version from GitHub and I am copying a lot of code from the sample file我已经从 GitHub 下载了当前版本,并且我从示例文件中复制了很多代码
Open-Xml-PowerTools-vNext\OpenXmlPowerTools\WmlToHtmlConverter.cs打开-Xml-PowerTools-vNext\OpenXmlPowerTools\WmlToHtmlConverter.cs

However, in application I am actually using the nuget package OpenXmlPowerTools Version 4.5.3.2 , which is marked as the latest stable version.但是,在应用程序中,我实际上使用的是 nuget package OpenXmlPowerTools Version 4.5.3.2 ,它被标记为最新的稳定版本。

Part of this code uses the method MetricsGetter.GetTextWidth :此代码的一部分使用方法MetricsGetter.GetTextWidth

var w = MetricsGetter.GetTextWidth(ff, fs, sz, runText);

However, this method is not present in the version of MetricsGetter in the nuget package.但是,该方法在 nuget package 中的 MetricsGetter 版本中不存在。

Short term I can copy the source code of this function into my application, so will not be a big problem, but which version is up to date?短期内我可以将这个 function 的源代码复制到我的应用程序中,所以问题不大,但是哪个版本是最新的?

Is the code in GitHub newer than the code in the nuget package? GitHub 中的代码是否比 nuget package 中的代码更新?
Or older?还是年纪大了?
Is there an alternative method which I should use with the nuget package?是否有我应该与 nuget package 一起使用的替代方法?

Unfortunately, the NuGet package is very much outdated.不幸的是,NuGet package 已经过时了。 Thus, the best approach is to:因此,最好的方法是:

  • fork (optionally) and clone EricWhiteDev's Open-Xml-PowerTools repository, fork(可选)并克隆 EricWhiteDev 的Open-Xml-PowerTools存储库,
  • build the OpenXmlPowerTools.dll assembly from source,从源代码构建OpenXmlPowerTools.dll程序集,
  • put that assembly into a libs folder (or whatever you use), and将该程序集放入libs文件夹(或任何您使用的文件夹),然后
  • reference that assembly in your projects.在您的项目中引用该程序集。

The previously official OfficeDev/Open-Xml-PowerTools repository has been archived.之前官方的OfficeDev/Open-Xml-PowerTools存储库已存档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM