Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] Tweak TinySDF docs to better describe font-family behavior.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLoer committed Dec 19, 2017
1 parent af52538 commit 9ed3aea
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,12 @@ public MapboxMapOptions setPrefetchesTiles(boolean enable) {
}

/**
* Set the font-family for generating glyphs locally for ideographs in the ‘CJK Unified Ideographs’
* Set the font family for generating glyphs locally for ideographs in the ‘CJK Unified Ideographs’
* and ‘Hangul Syllables’ ranges.
*
* The font family argument is passed to {@link android.graphics.Typeface#create(String, int)}.
* Default system fonts are defined in '/system/etc/fonts.xml'
*
* @param fontFamily font family for local ideograph generation.
* @return This
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ public class LocalGlyphRasterizer {

/***
* Uses Android-native drawing code to rasterize a single glyph
* to a square @{link Bitmap} which can be returned to portable
* to a square {@link Bitmap} which can be returned to portable
* code for transformation into a Signed Distance Field glyph.
*
* @param fontFamily Font family string to pass to Typeface.create
* @param bold If true, use Typeface.BOLD option
* @param glyphID 16-bit Unicode BMP codepoint to draw
*
* @return Return a @{link Bitmap} to be displayed in the requested tile.
* @return Return a {@link Bitmap} to be displayed in the requested tile.
*/
@WorkerThread
protected static Bitmap drawGlyphBitmap(String fontFamily, boolean bold, char glyphID) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
android:id="@id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:mapbox_localIdeographFontFamily="Droid Sans" />
app:mapbox_localIdeographFontFamily="sans-serif" />

</LinearLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@
<string name="description_textureview_debug">Use TextureView to render the map</string>
<string name="description_textureview_resize">Resize a map rendered on a TextureView</string>
<string name="description_textureview_animate">Animate a map rendered on a TextureView</string>
<string name="description_local_glyph">Suzhou using Droid Sans for Chinese glyphs</string>
<string name="description_local_glyph">Suzhou using local sans-serif for Chinese glyphs</string>
</resources>

0 comments on commit 9ed3aea

Please sign in to comment.