fontconfig: Branch 'master'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 doc/fcrange.fncs        |   10 ++++++++++
 fontconfig/fontconfig.h |    3 +++
 src/fcrange.c           |   23 +++++++++++++++++++++++
 3 files changed, 36 insertions(+)

New commits:
commit 1082161ea303cf2bbc13b62a191662984131e820
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Thu Sep 25 17:03:27 2014 +0900

    Add FcRangeGetDouble()
    
    https://bugs.freedesktop.org/show_bug.cgi?id=82876

diff --git a/doc/fcrange.fncs b/doc/fcrange.fncs
index 6054595..4181b80 100644
--- a/doc/fcrange.fncs
+++ b/doc/fcrange.fncs
@@ -62,3 +62,13 @@ integer sized value.
 all memory associated with it.
 @SINCE@		2.11.91
 @@
+
+@RET@		FcBool
+@FUNC@		FcRangeGetDouble
+@TYPE1@		const FcRange *			@ARG1@		range
+@TYPE2@		double *      			@ARG2@		begin
+@TYPE3@		double *			@ARG3@		end
+@PURPOSE@	Get the range in double
+@DESC@
+Returns in <parameter>begin</parameter> and <parameter>end</parameter> as the range.
+@SINCE@		2.11.91
diff --git a/fontconfig/fontconfig.h b/fontconfig/fontconfig.h
index e5b0959..afc917c 100644
--- a/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig.h
@@ -908,6 +908,9 @@ FcRangeDestroy (FcRange *range);
 FcPublic FcRange *
 FcRangeCopy (const FcRange *r);
 
+FcPublic FcBool
+FcRangeGetDouble(const FcRange *range, double *begin, double *end);
+
 /* fcweight.c */
 
 FcPublic int
diff --git a/src/fcrange.c b/src/fcrange.c
index 39eafd8..37cf067 100644
--- a/src/fcrange.c
+++ b/src/fcrange.c
@@ -76,6 +76,29 @@ FcRangeCopy (const FcRange *range)
     return ret;
 }
 
+FcBool
+FcRangeGetDouble(const FcRange *range, double *begin, double *end)
+{
+    if (!range)
+	return FcFalse;
+    if (range->is_double)
+    {
+	if (begin)
+	    *begin = range->u.d.begin;
+	if (end)
+	    *end = range->u.d.end;
+    }
+    else
+    {
+	if (begin)
+	    *begin = (double)range->u.i.begin;
+	if (end)
+	    *end = (double)range->u.i.end;
+    }
+
+    return FcTrue;
+}
+
 FcRange
 FcRangeCanonicalize (const FcRange *range)
 {
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux