Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: third_party/freetype/src/base/ftbdf.c

Issue 815103002: Update freetype to 2.5.4. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Adjust GYP and GN Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/freetype/src/base/ftbbox.c ('k') | third_party/freetype/src/base/ftbitmap.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/src/base/ftbdf.c
diff --git a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftbdf.c b/third_party/freetype/src/base/ftbdf.c
similarity index 69%
rename from core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftbdf.c
rename to third_party/freetype/src/base/ftbdf.c
index 60bc5fc2eb1563b02058ccd190cb3263243f267a..d9dcbad5edeb827374d1943a2bdc475d112d0f61 100644
--- a/core/src/fxge/fx_freetype/fxft2.5.01/src/base/ftbdf.c
+++ b/third_party/freetype/src/base/ftbdf.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (body). */
/* */
-/* Copyright 2002-2004, 2013 by */
+/* Copyright 2002-2004, 2013, 2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,9 +16,11 @@
/***************************************************************************/
-#include "../../include/ft2build.h"
-#include "../../include/freetype/internal/ftobjs.h"
-#include "../../include/freetype/internal/services/svbdf.h"
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+
+#include FT_INTERNAL_OBJECTS_H
+#include FT_SERVICE_BDF_H
/* documentation is in ftbdf.h */
@@ -32,19 +34,18 @@
const char* encoding = NULL;
const char* registry = NULL;
+ FT_Service_BDF service;
- error = FT_ERR( Invalid_Argument );
-
- if ( face )
- {
- FT_Service_BDF service;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- FT_FACE_FIND_SERVICE( face, service, BDF );
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- if ( service && service->get_charset_id )
- error = service->get_charset_id( face, &encoding, &registry );
- }
+ if ( service && service->get_charset_id )
+ error = service->get_charset_id( face, &encoding, &registry );
+ else
+ error = FT_THROW( Invalid_Argument );
if ( acharset_encoding )
*acharset_encoding = encoding;
@@ -65,23 +66,25 @@
{
FT_Error error;
+ FT_Service_BDF service;
- error = FT_ERR( Invalid_Argument );
- aproperty->type = BDF_PROPERTY_TYPE_NONE;
+ if ( !face )
+ return FT_THROW( Invalid_Face_Handle );
- if ( face )
- {
- FT_Service_BDF service;
+ if ( !aproperty )
+ return FT_THROW( Invalid_Argument );
+ aproperty->type = BDF_PROPERTY_TYPE_NONE;
- FT_FACE_FIND_SERVICE( face, service, BDF );
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- if ( service && service->get_property )
- error = service->get_property( face, prop_name, aproperty );
- }
+ if ( service && service->get_property )
+ error = service->get_property( face, prop_name, aproperty );
+ else
+ error = FT_THROW( Invalid_Argument );
- return error;
+ return error;
}
« no previous file with comments | « third_party/freetype/src/base/ftbbox.c ('k') | third_party/freetype/src/base/ftbitmap.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698