πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #234044

--

#234044
From: _
Date: Mon, 29 Jun 2009 11:27
72 lines
4342 bytes
ο»ΏI quote the way it's done in books.
I create titles that reflect the content of each message.
I can do this because I know the heritage of each post, to wit:
                 [ Oldest ancestor first ]
              sittingduck<duck@spamherelots.com
            Peterβ€’Jβ€’Ross  news:slrnh3ofr4.kn7.pjr@pjr.gotdns.org 
          sittingduck<duck@spamherelots.com
        Peterβ€’Jβ€’Ross  news:slrnh4ff0o.7va.pjr@pjr.gotdns.org
      Jeffβ€’Relf  news:_@Jeff_Relf.Seattle.2009_Jun29.0.23am.CA
  Rom<-@-.invalid    news:1tenawf6ve0oh.fe4vxxhwx3y0.dlg@40tude.net
    News.Software.Readers
    40tude  Individual.NET, NoGoogle Jun 29, 2009
      [JR] X.ZIP cannot quote (was: Can you quote this, monoSpaced ?)
              ―――――――――――――――――――――――――――
Re: These monoSpaced glyphs ( which you couldn't quote ):
  www.JeffRelf.F-M.FM/UTF-8.PNG
  news:_@Jeff_Relf.Seattle.2009_Jun29.0.23am.CA

This code gives me  Exactly  the number of columns I want:

  iCharW = ceil( CharW = WinW / ( ColsWin = 123 ) );
  [ from  www.JeffRelf.F-M.FM/X.CPP  ]

Although WinW is a float,
it's the integer-width of the maximized window, in pixels.

CharW is the non-integer-width of an ASCII glyph.
iCharW is the β€œceiling” of CharW.

A glyph that's wider than iCharW takes up multiple columns:

  SIZE  XY ; GetTextExtentPoint32( DC, B, 1 + Bass, &XY );
  G.W = XY.cx, G.H = XY.cy ;
  
  G.Cols = ceil( G.W / iCharW ), G.Rows = ceil( G.H / iCharH );
  G.W = G.Cols * iCharW, G.H = G.Rows * iCharH ;

For the DejaVu Sans Mono font,
the width-hight-ratio of a very large ASCII caracter is:
  189 x 366
  
As I Know this ratio, and I use floating point numbers everywhere,
I define every glyph as a multiple of the ratio, at a set scale.

When the taskBar changes ( e.g. when the screen resolution changes )
the scale changes ( at the reActivated-window event ).

CharH depends on CharW, it's the non-integer hight of an ASCII glyph:

  iCharH = ceil( CharH = 366 * CharW / 189 ) ; //  21 / 11; 1.936
  RowsWin = ceil( WinH / CharH ), Lines_Per_Pg = RowsWin - 1 - ToolBarLines ;

WinH is the integer-hight of the maximized window, in pixels.
RowsWin is the non-integer-rows in the window.

A font, including the SmallCaps font, is defined this way:

  const float  xβˆ•X = .8 ; //  Small-Caps uses a 20 percent smaller font.
       ―――――――――――――
  β–ΌX = ( ( 1 - xβˆ•X ) * CharW ) / 2 ;  //  Small-Caps Left margin
  β–ΌY = ceil( ( 1 - xβˆ•X ) * CharH );  // Small-Caps Top Margin
  gFont( DejaVuβ€’1, L"DejaVu Sans Mono", CharH );
       ―――――――――――――
  gFont( HFONT &F, LnP  N, float H ) {
  
    FontFamily Nym( N );  if ( ! Nym.IsAvailable() ) return ;
    DeleteObject( F );
    //  The ceiling sets the maximum-hight of an ASCII character's cell.
    F = CreateFont( ceil( H ), 0,0,0,0,0,0,0,0,0,0,0, FIXED_PITCH, N );
    if ( !caps )
      caps = CreateFont(
        xβˆ•X * H, 0,0,0,0,0,0,0,0,0,0,0, FIXED_PITCH, N );  }
Technical Details
Message-ID: <_@Jeff_Relf.Seattle.2009_Jun29.4.27am.Gg>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!transit4.hitnews.eu!feeder.news-service.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mail
References: <Xns9C2EAF9324D35duckrulestheuniverse@nomail.afraid.org> <slrnh3ofr4.kn7.pjr@pjr.gotdns.org> <Xns9C2FDE91E1A12duckrulestheuniverse@nomail.afraid.org> <slrnh4ff0o.7va.pjr@pjr.gotdns.org> <_@Jeff_Relf.Seattle.2009_Jun29.0.23am.CA> <1tenawf6ve0oh.fe4vxxhwx3y0.dlg@40tude.net>

Show Full Headers
Complete Article Headers
Message-ID: <_@Jeff_Relf.Seattle.2009_Jun29.4.27am.Gg>
Subject: --
Date: Mon, 29 Jun 2009 11:27:09 +0000
From: _@Jeff_Relf.Seattle.inValid
References: <Xns9C2EAF9324D35duckrulestheuniverse@nomail.afraid.org> <slrnh3ofr4.kn7.pjr@pjr.gotdns.org> <Xns9C2FDE91E1A12duckrulestheuniverse@nomail.afraid.org> <slrnh4ff0o.7va.pjr@pjr.gotdns.org> <_@Jeff_Relf.Seattle.2009_Jun29.0.23am.CA> <1tenawf6ve0oh.fe4vxxhwx3y0.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!transit4.hitnews.eu!feeder.news-service.com!news.glorb.com!news-spur2.glorb.com!homer.glorb.com!not-for-mail
Newsgroups: news.software.readers
Organization: Glorb Internet Services, http://www.glorb.com
Lines: 72
NNTP-Posting-Host: LJRQMPCiZvt7u6s5Ev1Q+Q.user.posting2.glorb.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: abuse@glorb.com
NNTP-Posting-Date: Mon, 29 Jun 2009 11:27:09 +0000 (UTC)
X-Notice: Scanned by Mr. Bill
User-Agent: JeffRelf.F-M.FM/X.ZIP