Moving dependency includes out of librs headers.

When we want to use it on the host, we shouldn't need to go hunting for every external dependency

Change-Id: I885262acdcdf5ede4a9392235f35d5e2f7038e8b
diff --git a/libs/rs/rsFont.cpp b/libs/rs/rsFont.cpp
index 8a5ab99..1c1bc98 100644
--- a/libs/rs/rsFont.cpp
+++ b/libs/rs/rsFont.cpp
@@ -20,6 +20,9 @@
 #include "rsFont.h"
 #include "rsProgramFragment.h"
 #include <cutils/properties.h>
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
 #include FT_BITMAP_H
 
 #include <GLES/gl.h>
@@ -208,7 +211,7 @@
             }
         }
 
-        penX += (cachedGlyph->mAdvance.x >> 6);
+        penX += (cachedGlyph->mAdvanceX >> 6);
 
         // If we were given a specific number of glyphs, decrement
         if (numGlyphs > 0) {
@@ -238,7 +241,8 @@
         return;
     }
 
-    glyph->mAdvance = mFace->glyph->advance;
+    glyph->mAdvanceX = mFace->glyph->advance.x;
+    glyph->mAdvanceY = mFace->glyph->advance.y;
     glyph->mBitmapLeft = mFace->glyph->bitmap_left;
     glyph->mBitmapTop = mFace->glyph->bitmap_top;
 
@@ -803,6 +807,22 @@
     }
 }
 
+bool FontState::CacheTextureLine::fitBitmap(FT_Bitmap_ *bitmap, uint32_t *retOriginX, uint32_t *retOriginY) {
+    if ((uint32_t)bitmap->rows > mMaxHeight) {
+        return false;
+    }
+
+    if (mCurrentCol + (uint32_t)bitmap->width < mMaxWidth) {
+        *retOriginX = mCurrentCol;
+        *retOriginY = mCurrentRow;
+        mCurrentCol += bitmap->width;
+        mDirty = true;
+       return true;
+    }
+
+    return false;
+}
+
 namespace android {
 namespace renderscript {