| 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 "text_int.h" | 9 #include "text_int.h" |
| 10 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1]) | 10 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1]) |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 if (found == NULL) { | 852 if (found == NULL) { |
| 853 return fontName; | 853 return fontName; |
| 854 } | 854 } |
| 855 return found->m_pFontFamily; | 855 return found->m_pFontFamily; |
| 856 }; | 856 }; |
| 857 typedef struct _FX_FontStyle { | 857 typedef struct _FX_FontStyle { |
| 858 FX_LPCSTR style; | 858 FX_LPCSTR style; |
| 859 FX_INT32 len; | 859 FX_INT32 len; |
| 860 } FX_FontStyle; | 860 } FX_FontStyle; |
| 861 const FX_FontStyle g_FontStyles[] = { | 861 const FX_FontStyle g_FontStyles[] = { |
| 862 "Bold", 4, | 862 { "Bold", 4 }, |
| 863 "Italic", 6, | 863 { "Italic", 6 }, |
| 864 "BoldItalic", 10, | 864 { "BoldItalic", 10 }, |
| 865 "Reg", 3, | 865 { "Reg", 3 }, |
| 866 "Regular", 7, | 866 { "Regular", 7 }, |
| 867 }; | 867 }; |
| 868 CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex) | 868 CFX_ByteString ParseStyle(FX_LPCSTR pStyle, int iLen, int iIndex) |
| 869 { | 869 { |
| 870 CFX_ByteTextBuf buf; | 870 CFX_ByteTextBuf buf; |
| 871 if (!iLen || iLen <= iIndex) { | 871 if (!iLen || iLen <= iIndex) { |
| 872 return buf.GetByteString(); | 872 return buf.GetByteString(); |
| 873 } | 873 } |
| 874 while (iIndex < iLen) { | 874 while (iIndex < iLen) { |
| 875 if (pStyle[iIndex] == ',') { | 875 if (pStyle[iIndex] == ',') { |
| 876 break; | 876 break; |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 } | 1550 } |
| 1551 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont; | 1551 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont; |
| 1552 name = pFont->m_FaceName; | 1552 name = pFont->m_FaceName; |
| 1553 return TRUE; | 1553 return TRUE; |
| 1554 } | 1554 } |
| 1555 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) | 1555 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) |
| 1556 { | 1556 { |
| 1557 return FALSE; | 1557 return FALSE; |
| 1558 } | 1558 } |
| 1559 #endif | 1559 #endif |
| OLD | NEW |