将从 https://github.com/ubawurinna/freetype-windows-binaries 下载下来的dll
放置到c:\windows\system32\ 下之后
import freetype 终于不报
>>> import freetype Traceback (most recent call last): File "D:\venv\jupyter\lib\site-packages\freetype\raw.py", line 34, in <module> _lib = ctypes.CDLL(filename) File "c:\Python35\Lib\ctypes\__init__.py", line 351, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] 找不到指定的模块。 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\venv\jupyter\lib\site-packages\freetype\__init__.py", line 21, in <module> from freetype.raw import * File "D:\venv\jupyter\lib\site-packages\freetype\raw.py", line 37, in <module> raise RuntimeError('Freetype library not found') RuntimeError: Freetype library not found >>>
但是:却报错:
>>> import freetype Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\venv\jupyter\lib\site-packages\freetype\__init__.py", line 21, in <module> from freetype.raw import * File "D:\venv\jupyter\lib\site-packages\freetype\raw.py", line 190, in <module> FT_Get_BDF_Charset_ID = _lib.FT_Get_BDF_Charset_ID File "c:\Python35\Lib\ctypes\__init__.py", line 364, in __getattr__ func = self.__getitem__(name) File "c:\Python35\Lib\ctypes\__init__.py", line 369, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'FT_Get_BDF_Charset_ID' not found >>>
解决方案就是把
D:\venv\jupyter\lib\site-packages\freetype\raw.py
相应的行(我这儿出现过两行)屏蔽掉,
#FT_Get_BDF_Charset_ID = _lib.FT_Get_BDF_Charset_ID #FT_Get_BDF_Property = _lib.FT_Get_BDF_Property
原因:怀疑从git上下载的dll较老,用dependence walker查,确实没有 FT_Get_BDF_Charset_ID 和 FT_Get_BDF_Property
如下图示:
相关推荐
FT_LOAD_COLOR and the corresponding FT_Pixel_Mode::FT_PIXEL_MODE_BGRA were introduced in FreeType 2.5.0.
/opt/QtSDK/Desktop/Qt/474/gcc/lib/libQtGui.so:-1: 错误:undefined reference to `FT_Library_SetLcdFilter'
Freetype 2.1.7 and earlier used width/height for matching sizes in the BDF and PCF loaders for Linux.
freetype:x86-windows * libpng:x86-windows * zlib:x86-windows Additional packages (*) need to be exported to complete this operation. Exporting package bzip2:x86-windows... Exporting package zlib:...
此压缩包内包含32位与64位,debug和release的所有已... auto ft = cv::freetype::createFreeType2(); ft->loadFontData("C:\\Windows\\Fonts\\simhei.ttf", 0); //使用ft->putText将文字输出在图像上. return 0; }
开源高质量的且可移植的字体引擎FreeType,提供统一的接口来访问多种字体格式文件,包括TrueType
linux环境下利用freetype将汉字转换成位图,在一些简单的中文打印和显示中有用
资源中带有freetype2410MT_D.lib库文件 VS2010工程创建的简单例子(内容只有几十行,只适合新手仅供参考): FT_Init_FreeType FT_New_Face FT_Set_Pixel_Sizes FT_Set_Transform FT_Load_Char
很好的freetype字体相关学习资料,网上找了好久,这个资料比较好,一般都收费,这个花了功夫才弄下来的,希望对做freetype字体的朋友有用,我自己也在学习和做这方面的东西。库代码网上有,自己可以下载。
freetype2-2.10.4-1-x86_64.pkg.tar.zst
lv_lib_freetype:FreeType的接口,以生成字体位图运行时
windows平台下动态编译的Freetype库。 vc:直接把lib文件加入链接器 QTCreator:pro文件里写上LIbs+=-L"lib文件所在目录" -lfreetype mingw gcc:同qtcreator
rootroot@cm-System-Product-Name:/home/wwt/linux_r16/lichee$ sudo apt-get install texinfo [sudo] password for rootroot: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 ...
harfbuzz-icu-freetype 使用Freetype2,UCDN和ICU的CMake构建配置的Harfbuzz 要在您的项目中使用,只需将以下内容添加到您的cmake配置中: # Harfbuzz ICU Freetype add_subdirectory ( ${PROJECT_SOURCE_DIR} /...
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
freetype:Freetype库的镜像
openCV3.4.16 Linux下编译文件 解压直接可以使用 openCV3.4.16_WithContrib_LinuxBuild Ubuntu 21.04 64Bit下编译且使用正常 Cmakelists.txt 使用: ########## OpenCV set(OpenCV_DIR /home/x/install/openCV/...
freetype:FreeType2库的Nim包装器
p5-Font-FreeType:使用FreeType2从Perl读取字体文件并渲染字形
ffmpeg各个组件下载地址+编译方法+错误处理,文件中都有记录,环境是mingw,ffmpeg版本是2.6.2