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 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 g_WeightPow_SHIFTJIS[index] * 2 * | 1557 g_WeightPow_SHIFTJIS[index] * 2 * |
1558 (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / | 1558 (FXSYS_abs((int)(ft_matrix.xx)) + FXSYS_abs((int)(ft_matrix.xy))) / |
1559 36655; | 1559 36655; |
1560 } else { | 1560 } else { |
1561 level = g_WeightPow_11[index] * (FXSYS_abs((int)(ft_matrix.xx)) + | 1561 level = g_WeightPow_11[index] * (FXSYS_abs((int)(ft_matrix.xx)) + |
1562 FXSYS_abs((int)(ft_matrix.xy))) / | 1562 FXSYS_abs((int)(ft_matrix.xy))) / |
1563 36655; | 1563 36655; |
1564 } | 1564 } |
1565 FXFT_Outline_Embolden(FXFT_Get_Glyph_Outline(m_Face), level); | 1565 FXFT_Outline_Embolden(FXFT_Get_Glyph_Outline(m_Face), level); |
1566 } | 1566 } |
1567 FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary, | 1567 FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(), |
1568 FT_LCD_FILTER_DEFAULT); | 1568 FT_LCD_FILTER_DEFAULT); |
1569 error = FXFT_Render_Glyph(m_Face, anti_alias); | 1569 error = FXFT_Render_Glyph(m_Face, anti_alias); |
1570 if (error) { | 1570 if (error) { |
1571 return NULL; | 1571 return NULL; |
1572 } | 1572 } |
1573 int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face)); | 1573 int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face)); |
1574 int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face)); | 1574 int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face)); |
1575 if (bmwidth > 2048 || bmheight > 2048) { | 1575 if (bmwidth > 2048 || bmheight > 2048) { |
1576 return NULL; | 1576 return NULL; |
1577 } | 1577 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1842 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1842 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
1843 va_list argList; | 1843 va_list argList; |
1844 va_start(argList, count); | 1844 va_start(argList, count); |
1845 for (int i = 0; i < count; i++) { | 1845 for (int i = 0; i < count; i++) { |
1846 int p = va_arg(argList, int); | 1846 int p = va_arg(argList, int); |
1847 ((FX_DWORD*)m_Key)[i] = p; | 1847 ((FX_DWORD*)m_Key)[i] = p; |
1848 } | 1848 } |
1849 va_end(argList); | 1849 va_end(argList); |
1850 m_KeyLen = count * sizeof(FX_DWORD); | 1850 m_KeyLen = count * sizeof(FX_DWORD); |
1851 } | 1851 } |
OLD | NEW |