{"id":292616,"date":"2019-07-26T15:00:58","date_gmt":"2019-07-26T15:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=292616"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=292616","title":{"rendered":"\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 Linux: \u0447\u0430\u0441\u0442\u044c 1"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u00ab\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 Linux\u00bb. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 C \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0441\u0447\u0438\u0442\u0430\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c FreeType \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f1d\/f91\/24b\/f1df9124b08622215c74018b9dafe1d7.png\"><\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c. \u0410 <a href=\"https:\/\/gist.github.com\/mrandri19\/245237a6bde246f119ab2b6245e540ba\">\u0432\u043e\u0442<\/a> \u0438 \u043a\u043e\u0434.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h1>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h1>\n<p>  <\/p>\n<ul>\n<li>\u041c\u043e\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430: <code>Ubuntu 18.04.2 LTS (bionic)<\/code>  <\/li>\n<li>\u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 C: <code>clang version 6.0.0-1ubuntu2<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 FreeType<\/h3>\n<p>  \u041d\u0430 Ubuntu \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c FreeType \u0438 libpng.<\/p>\n<pre><code class=\"bash\">$ sudo apt install libfreetype6 libfreetype6-dev $ sudo apt install libpng16-16 libpng-dev<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\u0423 \u043c\u0435\u043d\u044f FreeType \u0432\u0435\u0440\u0441\u0438\u0438 <code>2.8.1-2ubuntu2<\/code>, \u0445\u043e\u0442\u044f \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f <code>FreeType-2.10.1<\/code>, \u043e\u043d\u0430 \u0442\u043e\u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442.  <\/li>\n<li>libpng \u0432\u0435\u0440\u0441\u0438\u0438 <code>(1.6.34-1ubuntu0.18.04.2)<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<h1>\u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440<\/h1>\n<p>  <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b C (<code>main.c<\/code> \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435)<\/h4>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt;  int main() {   printf(\"Hello, world\\n\");   return 0; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ clang -Wall -Werror -o main main.c $ .\/main Hello, world<\/code><\/pre>\n<p>  <\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 FreeType<\/h4>\n<p>  \u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0443\u0442\u0438 include (\u0442. \u0435. \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 <code>#include<\/code>) \u0434\u043b\u044f FreeType \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\">$ pkg-config --cflags freetype2 -I\/usr\/include\/freetype2 -I\/usr\/include\/libpng16<\/code><\/pre>\n<p>  \u0421\u0442\u0440\u043e\u043a\u0430 <code>-I\/usr\/include\/freetype2 -I\/usr\/include\/libpng16<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u043b\u0430\u0433\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f FreeType \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 C.<\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt;  #include &lt;freetype2\/ft2build.h&gt; #include FT_FREETYPE_H  int main() {   printf(\"Hello, world\\n\");   return 0; }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">$ clang -I\/usr\/include\/freetype2 \\         -I\/usr\/include\/libpng16  \\         -Wall -Werror            \\         -o main                  \\          main.c $ .\/main Hello, world<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e FreeType<\/h3>\n<p>  \u0412\u043d\u0443\u0442\u0440\u0438 <code>main()<\/code> \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c FreeType \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>FT_Init_FreeType(&amp;ft)<\/code> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0448\u0438\u0431\u043e\u043a (\u0444\u0443\u043d\u043a\u0446\u0438\u0438 FreeType \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 0 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438).<\/p>\n<p>  (\u0421 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432\u0437\u044f\u0442\u044b \u0438\u0437 <a href=\"https:\/\/www.freetype.org\/freetype2\/docs\/reference\/index.html\">\u0441\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e FreeType API<\/a>).<\/p>\n<pre><code class=\"cpp\">FT_Library ft; FT_Error err = FT_Init_FreeType(&amp;ft); if (err != 0) {   printf(\"Failed to initialize FreeType\\n\");   exit(EXIT_FAILURE); }<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e FT_Library_Version \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<pre><code class=\"plaintext\">FT_Int major, minor, patch; FT_Library_Version(ft, &amp;major, &amp;minor, &amp;patch); printf(\"FreeType's version is %d.%d.%d\\n\", major, minor, patch);<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0442\u043e \u0432\u044b\u0441\u043a\u043e\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0449\u0438\u043a\u0430:<\/p>\n<pre><code class=\"plaintext\">\/tmp\/main-d41304.o: In function `main': main.c:(.text+0x14): undefined reference to `FT_Init_FreeType' main.c:(.text+0x54): undefined reference to `FT_Library_Version' clang: error: linker command failed with exit code 1 (use -v to see invocation)<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>-lfreetype<\/code>.<\/p>\n<pre><code class=\"bash\">$ clang -I\/usr\/include\/freetype2 \\         -I\/usr\/include\/libpng16  \\         -Wall -Werror            \\         -o main                  \\         -lfreetype               \\          main.c $ .\/main FreeType's version is 2.8.1<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0448\u0440\u0438\u0444\u0442\u0430<\/h3>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u0448\u0430\u0433 \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0448\u0440\u0438\u0444\u0442\u0430. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"https:\/\/fonts.google.com\/specimen\/Ubuntu+Mono\">ubuntu mono<\/a>.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c \u0442\u043e\u0447\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 font face, \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u043e\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u0432 (font family) \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0448\u0440\u0438\u0444\u0442\u0430\u043c\u0438, \u0441\u043c. <a href=\"https:\/\/www.freetype.org\/freetype2\/docs\/glyphs\/glyphs-1.html#section-1\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e FreeType<\/a>.<\/p>\n<p>  \u0422\u0440\u0435\u0442\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <i>face index<\/i>. \u041e\u043d \u0441\u043e\u0437\u0434\u0430\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044f\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e face \u0432 \u043e\u0434\u0438\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0448\u0440\u0438\u0444\u0442\u0430 \u0435\u0441\u0442\u044c \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043e\u0434\u0438\u043d face, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430, \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<pre><code class=\"cpp\"> FT_Face face; err = FT_New_Face(ft, \".\/UbuntuMono.ttf\", 0, &amp;face); if (err != 0) {   printf(\"Failed to load face\\n\");   exit(EXIT_FAILURE); } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0434\u043b\u044f face<\/h3>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043c\u044b \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u043c FreeType \u0436\u0435\u043b\u0430\u0435\u043c\u0443\u044e \u0448\u0438\u0440\u0438\u043d\u0443 \u0438 \u0432\u044b\u0441\u043e\u0442\u0443 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0448\u0438\u0440\u0438\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0443\u043b\u044c, FreeType \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u043e \u043a\u0430\u043a \u00ab\u0442\u0430\u043a\u0430\u044f \u0436\u0435, \u043a\u0430\u043a \u0434\u0440\u0443\u0433\u0438\u0435\u00bb, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 32px. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u0448\u0438\u0440\u0438\u043d\u043e\u0439 10px \u0438 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 16px.<\/p>\n<p>  \u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0435\u0440\u043f\u0435\u0442\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u0443 \u043d\u0430 \u0448\u0440\u0438\u0444\u0442\u0435 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u043c\u043e\u0434\u0437\u0438.<\/p>\n<pre><code class=\"cpp\">err = FT_Set_Pixel_Sizes(face, 0, 32); if (err != 0) {   printf(\"Failed to set pixel size\\n\");   exit(EXIT_FAILURE); }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043b\u044f \u0441\u0438\u043c\u0432\u043e\u043b\u0430<\/h3>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a <a href=\"https:\/\/www.freetype.org\/freetype2\/docs\/glyphs\/glyphs-1.html#section-2\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 FreeType<\/a> \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043e\u0431 \u0438\u043c\u0435\u043d\u0430\u0445. \u0421\u0438\u043c\u0432\u043e\u043b \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e <i>\u0433\u043b\u0438\u0444<\/i>. \u0421\u0438\u043c\u0432\u043e\u043b \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <code>char<\/code>, \u0430 \u0433\u043b\u0438\u0444 \u2014 \u044d\u0442\u043e \u043e\u0431\u0440\u0430\u0437, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u0432\u044f\u0437\u0430\u043d \u0441 \u044d\u0442\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c. \u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e char \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0433\u043b\u0438\u0444\u0430\u043c: \u0442. \u0435. \u0430\u043a\u0446\u0435\u043d\u0442\u0430\u043c. \u0410 \u0433\u043b\u0438\u0444 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c: \u0442. \u0435. \u043b\u0438\u0433\u0430\u0442\u0443\u0440\u0430\u043c, \u0433\u0434\u0435 -&gt; \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043e\u0434\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0433\u043b\u0438\u0444\u0430, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>FT_Get_Char_Index<\/code>. \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0433\u043b\u0438\u0444\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043a \u043e\u0434\u043d\u043e\u043c\u0443. \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>HarfBuzz<\/i>.<\/p>\n<pre><code class=\"cpp\"> FT_UInt glyph_index = FT_Get_Char_Index(face, 'a');<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0433\u043b\u0438\u0444\u0430 \u0438\u0437 face<\/h3>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 glyph_index, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0433\u043b\u0438\u0444 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e face.<\/p>\n<p>  \u0412 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043b\u0430\u0433\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u0442\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u0430\u043a \u0445\u0438\u043d\u0442\u0438\u043d\u0433 \u0438 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u044b\u0435 \u0448\u0440\u0438\u0444\u0442\u044b.<\/p>\n<pre><code class=\"cpp\">FT_Int32 load_flags = FT_LOAD_DEFAULT; err = FT_Load_Glyph(face, glyph_index, load_flags); if (err != 0) {   printf(\"Failed to load glyph\\n\");   exit(EXIT_FAILURE); }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u043b\u0438\u0444\u0430 \u0432 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 (glyph slot)<\/h3>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043d\u0430\u0448 \u0433\u043b\u0438\u0444 \u0432 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 (\u0441\u043b\u043e\u0442\u0435), \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432 <code>face-&gt;glyph<\/code>.<\/p>\n<p>  \u0424\u043b\u0430\u0433\u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043c\u044b \u0442\u043e\u0436\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LCD- (\u0438\u043b\u0438 c\u0443\u0431\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u044b\u0439) \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0438 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0442\u0435\u043d\u043a\u043e\u0432 \u0441\u0435\u0440\u043e\u0433\u043e (grayscale antialiasing).<\/p>\n<pre><code class=\"cpp\">FT_Int32 render_flags = FT_RENDER_MODE_NORMAL; err = FT_Render_Glyph(face-&gt;glyph, render_flags); if (err != 0) {   printf(\"Failed to render the glyph\\n\");   exit(EXIT_FAILURE); }<\/code><\/pre>\n<p>  <\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c<\/h3>\n<p>  \u0420\u0430\u0441\u0442\u0440\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0433\u043b\u0438\u0444\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 <code>face-&gt;glyph-&gt;bitmap.buffer<\/code>, \u0433\u0434\u0435 \u043e\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 char, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 255.<\/p>\n<p>  \u0411\u0443\u0444\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 2D-\u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a i-\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 j-\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c <code>column * row_width + row<\/code>, \u043a\u0430\u043a \u0432 <code>bitmap.buffer[i * face-&gt;glyph-&gt;bitmap.pitch + j]<\/code>.<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435 \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <code>bitmap.width<\/code> \u0432 \u0446\u0438\u043a\u043b\u0435 \u0438 <code>bitmap.pitch<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u0438\u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 \u0440\u0430\u0432\u043d\u0430 <code>bitmap.width<\/code>, \u043d\u043e \u00ab\u0448\u0438\u0440\u0438\u043d\u0430\u00bb \u0431\u0443\u0444\u0435\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <code>bitmap.pitch<\/code>.<\/p>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043a\u043e\u0434\u0435 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u044f\u0440\u043a\u043e\u0441\u0442\u0438 \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0440\u0438\u0441\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b.<\/p>\n<pre><code class=\"cpp\">for (size_t i = 0; i &lt; face-&gt;glyph-&gt;bitmap.rows; i++) {   for (size_t j = 0; j &lt; face-&gt;glyph-&gt;bitmap.width; j++) {     unsigned char pixel_brightness =         face-&gt;glyph-&gt;bitmap.buffer[i * face-&gt;glyph-&gt;bitmap.pitch + j];      if (pixel_brightness &gt; 169) {       printf(\"*\");     } else if (pixel_brightness &gt; 84) {       printf(\".\");     } else {       printf(\" \");     }   }   printf(\"\\n\"); }<\/code><\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<pre><code class=\"bash\">$ clang -I\/usr\/include\/freetype2 \\         -I\/usr\/include\/libpng16  \\         -Wall -Werror            \\         -o main                  \\         -lfreetype               \\          main.c &amp;&amp; .\/main FreeType's version is 2.8.1    .*****.   .********.   .*********    .     ***.           ***           ***     .********   ***********  .**.     ***  ***      ***  ***      ***  ***.     ***  .***********   ***********    .*******..<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/gist.github.com\/mrandri19\/245237a6bde246f119ab2b6245e540ba\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h1>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 (\u0438 \u0431\u0443\u0434\u0435\u0442) \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 OpenGL \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u044d\u043c\u043e\u0434\u0437\u0438, \u0441\u0443\u0431\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430, \u043b\u0438\u0433\u0430\u0442\u0443\u0440 \u0438 \u043c\u043d\u043e\u0433\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0441\u0443\u0431\u043f\u0438\u043a\u0441\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0438 LCD \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043e\u0442\u0442\u0435\u043d\u043a\u0430\u043c\u0438 \u0441\u0435\u0440\u043e\u0433\u043e, \u0438\u0445 \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u0445.<\/p>\n<p>  \u0414\u043e \u0441\u043a\u043e\u0440\u043e\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0438.<\/p><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/461497\/\"> https:\/\/habr.com\/ru\/post\/461497\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u00ab\u0421\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 Linux\u00bb. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 C \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432. \u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0441\u0447\u0438\u0442\u0430\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0434\u043b\u044f \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<p>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c FreeType \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440\u0435\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/f1d\/f91\/24b\/f1df9124b08622215c74018b9dafe1d7.png\"><\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c. \u0410 <a href=\"https:\/\/gist.github.com\/mrandri19\/245237a6bde246f119ab2b6245e540ba\">\u0432\u043e\u0442<\/a> \u0438 \u043a\u043e\u0434.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-292616","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=292616"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/292616\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=292616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=292616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=292616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}