Image_Text Enchancement

From: Date: Mon, 08 Mar 2004 21:24:42 +0000
Subject: Image_Text Enchancement
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26222@lists.php.net to get a copy of this message
Hi Tobias! Hi Stefan! Hi All! Thanks for your suggest, I think I learn much more, how the way to become a constributor and open source rules. I hope never forget that next time. I guess I know what's for measurize() and automeasurize(), that's the different between my mind and your mind, you want the text automatically fit and break into textbox, but I want the text result is absolutelly no change (resize) or something else. Shortly your base is Textbox, and my base is Font. I think you know what I mean. However, I'm ready if you need the help, cause I'm very like works with image and I hope you can found something in my code. Thanks to All for everything. Regards, Firman ----- Original Message ----- From: "Tobias Schlitt" <tobias@schlitt.info> To: "Firman Wandayandi" <fwd@vfemail.net>; <neufeind@php.net> Sent: Tuesday, March 09, 2004 2:52 AM Subject: Re: Request for Apologize > Hi Firman! Hi Stefan! > > Sorry, that this mail will be a bit short, too, but I'm pretty busy with > work currently. I hope this will not last longer than the current week. > > First to Firman's apologize: > Your are welcome, but if you want to code open source the first thing > you have to learn is: First read, read, read - than talk/code/publish. > There are some (written and unwritten) rules one has to follow in OS. :) > Btw. one of this is to keep the original creators credits in a file. > Nevertheless, forgiven and forgotten. :) > > Now to the important things. > > I'm very glad that someone volunteers to implement Image_Text for bitmap > fonts, but I guess you did not get the real purpose of Image_Text. The > class provides graphic-tool like functionality to users in respect to > text boxes. In other words: Image_Text let's you define a text box and > will automatically do linebreaking and stuff for you and even (if you > wish) determine the best font-size for a text to fit the defined text > box best. This are things I can not find in your class. > > I guess that's the reason, why you proposed such weired API breaks and > threw away my most important methods (measurize and automeasurize). :) > Maybe you should try out the Image_Text examples and play around with > them a bit to see, what I mean. > > What we have to find now is: > > a) Maybe a solution to implement the following functionalities for > bitmap fonts: > - Measurize (automatically break a line, when it gets to long to > fit the text box) > - Automeasurize (automatically determining the best font size for > a text to fit in a text box) > - Rotations beside 90° steps (which is not possible, I guess) > b) A way to integrate both font types into 1 package. > > For b) the font_type option looks ok for me to determine which rendering > type to use. Standard for this option would be a constant like > IMAGE_TEXT_RENDER_TTF and the opposite can be IMAGE_TEXT_RENDER_BITMAP. > But what is defenitly necessary here are some smaller API breaks, since > currently only TTF rendering is possible. A factory pattern should be > the solution for that. So users will have to call $text = > Image_Text::factory($options) in future instead of $text = new > Image_Text($options). > > So far, so good. I wait for your comments. > > Regards, > Toby > > -- > Tobias Schlitt > a passion for php http://www.schlitt.info > > >

« previous php.pear.dev (#26222) next »