| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "core/fxcodec/include/fx_codec.h" | 9 #include "core/fxcodec/include/fx_codec.h" |
| 10 #include "core/fxge/ge/fx_text_int.h" | 10 #include "core/fxge/ge/fx_text_int.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 FX_BOOL bNormal = FALSE; | 250 FX_BOOL bNormal = FALSE; |
| 251 if ((text_flags & FXTEXT_NOSMOOTH) == 0) { | 251 if ((text_flags & FXTEXT_NOSMOOTH) == 0) { |
| 252 if (m_DeviceClass == FXDC_DISPLAY && m_bpp > 1) { | 252 if (m_DeviceClass == FXDC_DISPLAY && m_bpp > 1) { |
| 253 FX_BOOL bClearType; | 253 FX_BOOL bClearType; |
| 254 if (!pFont->GetFace() && | 254 if (!pFont->GetFace() && |
| 255 !(pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_CLEARTYPE)) { | 255 !(pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_CLEARTYPE)) { |
| 256 bClearType = FALSE; | 256 bClearType = FALSE; |
| 257 } else { | 257 } else { |
| 258 bClearType = text_flags & FXTEXT_CLEARTYPE; | 258 bClearType = text_flags & FXTEXT_CLEARTYPE; |
| 259 } | 259 } |
| 260 if ((m_RenderCaps & (FXRC_ALPHA_OUTPUT | FXRC_CMYK_OUTPUT))) { | 260 if (!CFX_GEModule::Get()->GetFontMgr()->FTLibrarySupportsHinting()) { |
| 261 // Some Freetype implementations (like the one packaged with Fedora) do |
| 262 // not support hinting due to patents 6219025, 6239783, 6307566, |
| 263 // 6225973, 6243070, 6393145, 6421054, 6282327, and 6624828; the latest |
| 264 // one expires 10/7/19. This makes LCD antialiasing very ugly, so we |
| 265 // instead fall back on NORMAL antialiasing. |
| 266 anti_alias = FXFT_RENDER_MODE_NORMAL; |
| 267 } else if ((m_RenderCaps & (FXRC_ALPHA_OUTPUT | FXRC_CMYK_OUTPUT))) { |
| 261 anti_alias = FXFT_RENDER_MODE_LCD; | 268 anti_alias = FXFT_RENDER_MODE_LCD; |
| 262 bNormal = TRUE; | 269 bNormal = TRUE; |
| 263 } else if (m_bpp < 16) { | 270 } else if (m_bpp < 16) { |
| 264 anti_alias = FXFT_RENDER_MODE_NORMAL; | 271 anti_alias = FXFT_RENDER_MODE_NORMAL; |
| 265 } else { | 272 } else { |
| 266 if (bClearType == FALSE) { | 273 if (bClearType == FALSE) { |
| 267 anti_alias = FXFT_RENDER_MODE_LCD; | 274 anti_alias = FXFT_RENDER_MODE_LCD; |
| 268 bNormal = TRUE; | 275 bNormal = TRUE; |
| 269 } else { | 276 } else { |
| 270 anti_alias = FXFT_RENDER_MODE_LCD; | 277 anti_alias = FXFT_RENDER_MODE_LCD; |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1907 void _CFX_UniqueKeyGen::Generate(int count, ...) { | 1914 void _CFX_UniqueKeyGen::Generate(int count, ...) { |
| 1908 va_list argList; | 1915 va_list argList; |
| 1909 va_start(argList, count); | 1916 va_start(argList, count); |
| 1910 for (int i = 0; i < count; i++) { | 1917 for (int i = 0; i < count; i++) { |
| 1911 int p = va_arg(argList, int); | 1918 int p = va_arg(argList, int); |
| 1912 ((uint32_t*)m_Key)[i] = p; | 1919 ((uint32_t*)m_Key)[i] = p; |
| 1913 } | 1920 } |
| 1914 va_end(argList); | 1921 va_end(argList); |
| 1915 m_KeyLen = count * sizeof(uint32_t); | 1922 m_KeyLen = count * sizeof(uint32_t); |
| 1916 } | 1923 } |
| OLD | NEW |