What you do is co-opt a coffee stand to open shop right outside your front door, or in a secluded corner. That way people can get food and stay longer, but the library doesn't just turn into a coffee shop with a few books.
I've seen a few libraries with the just-outside-the-door model, and a Borders with a small Peet's upstairs. Both were well-executed.
The Cameron Village library (Raleigh, NC) has a coffee shop. The best info I could find is from their Facebook page :
> Has it been a while since you been to a library? Cameron Village Regional Library is the only library in Wake County that offers coffee bar service to its patrons! Come visit your public library and browse the stacks with a beverage in hand. Or just come and meet up with a friend and catch up before heading over to the shops and events at Cameron Village.