OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
10 #include "text_int.h" | 10 #include "text_int.h" |
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 g_WeightPow_SHIFTJIS[index] * 2 * | 1585 g_WeightPow_SHIFTJIS[index] * 2 * |
1586 (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / | 1586 (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / |
1587 36655; | 1587 36655; |
1588 } else { | 1588 } else { |
1589 level = g_WeightPow_11[index] * (FXSYS_abs((int)(ft_matrix.xx)) + | 1589 level = g_WeightPow_11[index] * (FXSYS_abs((int)(ft_matrix.xx)) + |
1590 FXSYS_abs((int)(ft_matrix.xy))) / | 1590 FXSYS_abs((int)(ft_matrix.xy))) / |
1591 36655; | 1591 36655; |
1592 } | 1592 } |
1593 FXFT_Outline_Embolden(FXFT_Get_Glyph_Outline(m_Face), level); | 1593 FXFT_Outline_Embolden(FXFT_Get_Glyph_Outline(m_Face), level); |
1594 } | 1594 } |
1595 FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary, | 1595 FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(), |
1596 FT_LCD_FILTER_DEFAULT); | 1596 FT_LCD_FILTER_DEFAULT); |
1597 error = FXFT_Render_Glyph(m_Face, anti_alias); | 1597 error = FXFT_Render_Glyph(m_Face, anti_alias); |
1598 if (error) { | 1598 if (error) { |
1599 return NULL; | 1599 return NULL; |
1600 } | 1600 } |
1601 int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face)); | 1601 int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face)); |
1602 int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face)); | 1602 int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face)); |
1603 if (bmwidth > 2048 || bmheight > 2048) { | 1603 if (bmwidth > 2048 || bmheight > 2048) { |
1604 return NULL; | 1604 return NULL; |
1605 } | 1605 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1870 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1871 va_list argList; | 1871 va_list argList; |
1872 va_start(argList, count); | 1872 va_start(argList, count); |
1873 for (int i = 0; i < count; i++) { | 1873 for (int i = 0; i < count; i++) { |
1874 int p = va_arg(argList, int); | 1874 int p = va_arg(argList, int); |
1875 ((FX_DWORD*)m_Key)[i] = p; | 1875 ((FX_DWORD*)m_Key)[i] = p; |
1876 } | 1876 } |
1877 va_end(argList); | 1877 va_end(argList); |
1878 m_KeyLen = count * sizeof(FX_DWORD); | 1878 m_KeyLen = count * sizeof(FX_DWORD); |
1879 } | 1879 } |
OLD | NEW |