Fresco/Berlin/modules/Fonts Font.cc,1.3,1.4 FontKitImpl.cc,1.4,1.5 Glyph.cc,1.3,1.4 Glyph.hh,1.3,1.4

Nick Lewycky <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Berlin/modules/Fonts
In directory purcel:/tmp/cvs-serv3637

Modified Files:
	Font.cc FontKitImpl.cc Glyph.cc Glyph.hh 
Log Message:
A little more cleanup. It now finds all its own symbols and can be loaded
by the server.


Index: Font.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Fonts/Font.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Font.cc	16 Feb 2003 03:47:47 -0000	1.3
+++ Font.cc	16 Feb 2003 04:11:44 -0000	1.4
@@ -87,6 +87,16 @@
   return my_size;
 }
 
+Fresco::Vertex Font::kerning(Fresco::Unichar first, Fresco::Unichar second)
+{
+  // XXX this is BIDI-incorrect, of course...
+  FT_Vector kern;
+  FT_Get_Kerning(my_face, first, second, FT_KERNING_DEFAULT, &kern);
+  Fresco::Vertex v;
+  v.x = kern.x / 0x10000;
+  v.y = kern.y / 0x10000;
+}
+
 CORBA::Float Font::angle()
 {
   float angle = 0.;

Index: FontKitImpl.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Fonts/FontKitImpl.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- FontKitImpl.cc	16 Feb 2003 03:47:47 -0000	1.4
+++ FontKitImpl.cc	16 Feb 2003 04:11:44 -0000	1.5
@@ -202,3 +202,9 @@
 FontIterator_ptr FontKitImpl::last_font()
 {
 }
+
+extern "C" KitImpl *load()
+{
+  static std::string properties[] = {"implementation", "FontKitImpl"};
+  return create_kit<Berlin::FontKit::FontKitImpl> ("IDL:fresco.org/Fresco/FontKit:1.0", properties, 2);
+}

Index: Glyph.cc
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Fonts/Glyph.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Glyph.cc	16 Feb 2003 03:47:47 -0000	1.3
+++ Glyph.cc	16 Feb 2003 04:11:44 -0000	1.4
@@ -24,6 +24,11 @@
 #include <Berlin/RasterImpl.hh>
 #include "Glyph.hh"
 
+namespace Berlin
+{
+namespace FontKit
+{
+
 GlyphImpl::GlyphImpl(FT_Face face, FT_ULong char_index)
   : my_face(face)
 {
@@ -34,6 +39,8 @@
   FT_Load_Glyph(my_face, char_index, FT_LOAD_DEFAULT);
 }
 
+GlyphImpl::~GlyphImpl() {}
+
 Fresco::Raster_ptr GlyphImpl::bitmap()
 {
   RasterImpl *raster = new RasterImpl();
@@ -152,3 +159,6 @@
   my_tr.yx = (e2.x-o.x)*0x10000;
   my_tr.yy = (e2.y-o.y)*0x10000;
 }
+
+} // namespace
+} // namespace

Index: Glyph.hh
===================================================================
RCS file: /cvs/fresco/Fresco/Berlin/modules/Fonts/Glyph.hh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Glyph.hh	16 Feb 2003 03:47:47 -0000	1.3
+++ Glyph.hh	16 Feb 2003 04:11:44 -0000	1.4
@@ -35,6 +35,11 @@
 
 class Fresco::Raster;
 
+namespace Berlin
+{
+namespace FontKit
+{
+
 class GlyphImpl : public virtual POA_Fresco::Glyph,
                   public virtual RefCountBaseImpl,
                   public virtual IdentifiableImpl
@@ -51,5 +56,8 @@
   FT_Face my_face;
   FT_Matrix my_tr;
 };
+
+} // namespace
+} // namespace
 
 #endif // header guard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.